提交 d39625c4 编写于 作者: S Syam Sidhardhan 提交者: Greg Kroah-Hartman

staging: silicom: Remove redundant NULL check before kfree

kfree on NULL pointer is a no-op.
Signed-off-by: NSyam Sidhardhan <s.syam@samsung.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册