summaryrefslogtreecommitdiff
path: root/drivers/staging/silicom
diff options
context:
space:
mode:
authorSyam Sidhardhan <s.syam@samsung.com>2013-03-07 01:44:54 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-11 09:43:44 -0700
commitd39625c4eb3349569f0959a4488e71faa927ec4a (patch)
tree34edbfbb50e5d4843cc82986a32392e5f48718c4 /drivers/staging/silicom
parentf54ab7d916ee4504e91b552c38cfa2f82df3718d (diff)
staging: silicom: Remove redundant NULL check before kfree
kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/silicom')
-rw-r--r--drivers/staging/silicom/bp_mod.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/silicom/bp_mod.c b/drivers/staging/silicom/bp_mod.c
index 61a912debb96..45a222723207 100644
--- a/drivers/staging/silicom/bp_mod.c
+++ b/drivers/staging/silicom/bp_mod.c
@@ -6995,15 +6995,13 @@ static void __exit bypass_cleanup_module(void)
/* unmap all devices */
for (i = 0; i < device_num; i++) {
#ifdef BP_SELF_TEST
- if (bpctl_dev_arr[i].bp_tx_data)
- kfree(bpctl_dev_arr[i].bp_tx_data);
+ kfree(bpctl_dev_arr[i].bp_tx_data);
#endif
iounmap((void *)(bpctl_dev_arr[i].mem_map));
}
/* free all devices space */
- if (bpctl_dev_arr)
- kfree(bpctl_dev_arr);
+ kfree(bpctl_dev_arr);
/*
* Unregister the device