aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/dgap
diff options
context:
space:
mode:
authorLidza Louina <lidza.louina@gmail.com>2013-09-23 18:47:12 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-09-25 16:09:24 -0700
commit57a42192e61e7d0074fa6027e2565461bfd60147 (patch)
treeb868f8d2d8d2b24f51059cf609c49e3e72112fcc /drivers/staging/dgap
parentdrivers: staging: dgap: move DG_NAME and DG_PART from "Makefile" to "dgap_driver.h" (diff)
downloadlinux-dev-57a42192e61e7d0074fa6027e2565461bfd60147.tar.xz
linux-dev-57a42192e61e7d0074fa6027e2565461bfd60147.zip
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>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r--drivers/staging/dgap/dgap_driver.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/staging/dgap/dgap_driver.c b/drivers/staging/dgap/dgap_driver.c
index a3fa6a80b3ae..4c1515ee56e5 100644
--- a/drivers/staging/dgap/dgap_driver.c
+++ b/drivers/staging/dgap/dgap_driver.c
@@ -416,8 +416,7 @@ void dgap_cleanup_module(void)
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) {
dgap_remove_ports_sysfiles(dgap_Board[i]);
@@ -484,10 +483,8 @@ static void dgap_cleanup_board(struct board_t *brd)
}
}
- if (brd->flipbuf)
- kfree(brd->flipbuf);
- if (brd->flipflagbuf)
- kfree(brd->flipflagbuf);
+ kfree(brd->flipbuf);
+ kfree(brd->flipflagbuf);
dgap_Board[brd->boardnum] = NULL;