aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/dgnc
diff options
context:
space:
mode:
authorDaeseok Youn <daeseok.youn@gmail.com>2014-07-03 19:12:01 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 12:07:30 -0700
commit5b4af85eedea141026214fb40827a718633c5ccf (patch)
tree990d81cdeac44b86677ed0ba8ccb21fd0bcd3885 /drivers/staging/dgnc
parent4c0e01496b0ee28b926ff8256f4406525b7aed01 (diff)
downloadlinux-stericsson-5b4af85eedea141026214fb40827a718633c5ccf.tar.gz
staging: dgnc: remove redundant null check for kfree()
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r--drivers/staging/dgnc/dgnc_tty.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 4135cb0ed9f5..8081621cc9c0 100644
--- a/drivers/staging/dgnc/dgnc_tty.c
+++ b/drivers/staging/dgnc/dgnc_tty.c
@@ -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;
}