]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
staging: silicom: Remove redundant NULL check before kfree
authorSyam Sidhardhan <s.syam@samsung.com>
Wed, 6 Mar 2013 20:14:54 +0000 (01:44 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 11 Mar 2013 16:43:44 +0000 (09:43 -0700)
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>
drivers/staging/silicom/bp_mod.c

index 61a912debb967c048a75c045e1cdadbd86104734..45a222723207280cf6abd0d6a5b3963b4dda4c49 100644 (file)
@@ -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