summaryrefslogtreecommitdiff
path: root/drivers/staging/dgnc
diff options
context:
space:
mode:
authorVitaly Osipov <vitaly.osipov@gmail.com>2014-04-27 00:59:17 +1000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-15 13:46:00 -0700
commit36aa10aa018c2ed5571ffd145f39d3fcf993cee0 (patch)
treed435f04ac8707a2b5ba7c96199cedd47067a393e /drivers/staging/dgnc
parent3f2889621a6d47c3aa5e4284af808f8d79cc5d5d (diff)
staging: dgnc: redundant NULL checks before kfree()
Removed redundant NULL checks before calling kfree() Signed-off-by: Vitaly Osipov <vitaly.osipov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r--drivers/staging/dgnc/dgnc_driver.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/staging/dgnc/dgnc_driver.c b/drivers/staging/dgnc/dgnc_driver.c
index 031e13e1f51a..5af8300dfb0d 100644
--- a/drivers/staging/dgnc/dgnc_driver.c
+++ b/drivers/staging/dgnc/dgnc_driver.c
@@ -448,20 +448,15 @@ static void dgnc_cleanup_board(struct dgnc_board *brd)
/* Free all allocated channels structs */
for (i = 0; i < MAXPORTS ; i++) {
if (brd->channels[i]) {
- if (brd->channels[i]->ch_rqueue)
- kfree(brd->channels[i]->ch_rqueue);
- if (brd->channels[i]->ch_equeue)
- kfree(brd->channels[i]->ch_equeue);
- if (brd->channels[i]->ch_wqueue)
- kfree(brd->channels[i]->ch_wqueue);
-
+ kfree(brd->channels[i]->ch_rqueue);
+ kfree(brd->channels[i]->ch_equeue);
+ kfree(brd->channels[i]->ch_wqueue);
kfree(brd->channels[i]);
brd->channels[i] = NULL;
}
}
- if (brd->flipbuf)
- kfree(brd->flipbuf);
+ kfree(brd->flipbuf);
dgnc_Board[brd->boardnum] = NULL;