]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: wilc1000: remove unnecessary NULL check in clear_shadow_scan()
authorAjay Singh <ajay.kathat@microchip.com>
Tue, 4 Sep 2018 06:39:20 +0000 (12:09 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 10 Sep 2018 15:17:38 +0000 (17:17 +0200)
Cleanup patch to remove the unnecessary NULL check before freeing up ies
information in clear_shadow_scan().

Signed-off-by: Ajay Singh <ajay.kathat@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c

index ede9134722e3dc4bcadf5629710cd9721638df5c..00a167bd73086185e8edab9cd1b302fb68364fcb 100644 (file)
@@ -165,10 +165,8 @@ static void clear_shadow_scan(void)
                return;
 
        for (i = 0; i < last_scanned_cnt; i++) {
-               if (last_scanned_shadow[i].ies) {
-                       kfree(last_scanned_shadow[i].ies);
-                       last_scanned_shadow[i].ies = NULL;
-               }
+               kfree(last_scanned_shadow[i].ies);
+               last_scanned_shadow[i].ies = NULL;
 
                kfree(last_scanned_shadow[i].join_params);
                last_scanned_shadow[i].join_params = NULL;