Commit d39625c4 authored by Syam Sidhardhan's avatar Syam Sidhardhan Committed by Greg Kroah-Hartman

staging: silicom: Remove redundant NULL check before kfree

kfree on NULL pointer is a no-op.
Signed-off-by: default avatarSyam Sidhardhan <s.syam@samsung.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f54ab7d9
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment