From: Syam Sidhardhan <s.syam@xxxxxxxxxxx> kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@xxxxxxxxxxx> --- drivers/staging/silicom/bp_mod.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/staging/silicom/bp_mod.c b/drivers/staging/silicom/bp_mod.c index 58c5f5c..b00769c 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 -- 1.7.9.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel