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

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

parent 4c0e0149
Loading
Loading
Loading
Loading
+6 −12
Original line number Diff line number Diff line
@@ -417,11 +417,9 @@ int dgnc_tty_init(struct dgnc_board *brd)
 */
void dgnc_tty_post_uninit(void)
{
	if (dgnc_TmpWriteBuf) {
	kfree(dgnc_TmpWriteBuf);
	dgnc_TmpWriteBuf = NULL;
}
}


/*
@@ -456,15 +454,11 @@ 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;
}
}


#define TMPBUFLEN (1024)