Commit 5b4af85e authored by Daeseok Youn's avatar Daeseok Youn Committed by Greg Kroah-Hartman

staging: dgnc: remove redundant null check for kfree()

Signed-off-by: default avatarDaeseok Youn <daeseok.youn@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4c0e0149
......@@ -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;
}
}
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment