* [PATCH 1/4] staging: dgnc: remove redundant null check for kfree()
@ 2014-07-03 10:12 Daeseok Youn
0 siblings, 0 replies; only message in thread
From: Daeseok Youn @ 2014-07-03 10:12 UTC (permalink / raw)
To: lidza.louina, gregkh; +Cc: markh, driverdev-devel, devel, linux-kernel
Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
---
drivers/staging/dgnc/dgnc_tty.c | 18 ++++++------------
1 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_tty.c
index 4135cb0..8081621 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;
}
--
1.7.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-07-03 10:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-03 10:12 [PATCH 1/4] staging: dgnc: remove redundant null check for kfree() Daeseok Youn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®