]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: dgnc: remove redundant null check for kfree()
authorDaeseok Youn <daeseok.youn@gmail.com>
Thu, 3 Jul 2014 10:12:01 +0000 (19:12 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Jul 2014 19:07:30 +0000 (12:07 -0700)
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/dgnc/dgnc_tty.c

index 4135cb0ed9f5b4e852b7c166cd138b95388d1b0d..8081621cc9c0c4b2166e0e4ad452d2d4a54a91d1 100644 (file)
@@ -417,10 +417,8 @@ int dgnc_tty_init(struct dgnc_board *brd)
  */
 void dgnc_tty_post_uninit(void)
 {
-       if (dgnc_TmpWriteBuf) {
-               kfree(dgnc_TmpWriteBuf);
-               dgnc_TmpWriteBuf = NULL;
-       }
+       kfree(dgnc_TmpWriteBuf);
+       dgnc_TmpWriteBuf = NULL;
 }
 
 
@@ -456,14 +454,10 @@ void dgnc_tty_uninit(struct dgnc_board *brd)
                brd->dgnc_Major_TransparentPrint_Registered = FALSE;
        }
 
-       if (brd->SerialDriver.ttys) {
-               kfree(brd->SerialDriver.ttys);
-               brd->SerialDriver.ttys = NULL;
-       }
-       if (brd->PrintDriver.ttys) {
-               kfree(brd->PrintDriver.ttys);
-               brd->PrintDriver.ttys = NULL;
-       }
+       kfree(brd->SerialDriver.ttys);
+       brd->SerialDriver.ttys = NULL;
+       kfree(brd->PrintDriver.ttys);
+       brd->PrintDriver.ttys = NULL;
 }