staging: dgap: driver.c: removes smatch warning "redundant null check"
This patch removes these smatch warnings from dgap_driver.c: redundant null check on dgap_config_buf calling kfree() redundant null check on brd->flipbuf calling kfree() redundant null check on brd->flipflagbuf calling kfree() Signed-off-by: Lidza Louina <lidza.louina@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
6319c61aec
commit
57a42192e6
@ -416,7 +416,6 @@ void dgap_cleanup_module(void)
|
|||||||
unregister_chrdev(DIGI_DGAP_MAJOR, "dgap");
|
unregister_chrdev(DIGI_DGAP_MAJOR, "dgap");
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dgap_config_buf)
|
|
||||||
kfree(dgap_config_buf);
|
kfree(dgap_config_buf);
|
||||||
|
|
||||||
for (i = 0; i < dgap_NumBoards; ++i) {
|
for (i = 0; i < dgap_NumBoards; ++i) {
|
||||||
@ -484,9 +483,7 @@ static void dgap_cleanup_board(struct board_t *brd)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (brd->flipbuf)
|
|
||||||
kfree(brd->flipbuf);
|
kfree(brd->flipbuf);
|
||||||
if (brd->flipflagbuf)
|
|
||||||
kfree(brd->flipflagbuf);
|
kfree(brd->flipflagbuf);
|
||||||
|
|
||||||
dgap_Board[brd->boardnum] = NULL;
|
dgap_Board[brd->boardnum] = NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user