From: Syam Sidhardhan Date: Wed, 6 Mar 2013 20:14:54 +0000 (+0530) Subject: staging: silicom: Remove redundant NULL check before kfree X-Git-Tag: v4.13~9725^2~764 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d39625c4eb3349569f0959a4488e71faa927ec4a;p=mirror_ubuntu-bionic-kernel.git staging: silicom: Remove redundant NULL check before kfree kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan Signed-off-by: Greg Kroah-Hartman --- 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