diff options
author | Ajay Singh <ajay.kathat@microchip.com> | 2018-09-04 09:39:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-10 18:17:38 +0300 |
commit | 009324daf6a021cb5978b1bcb8b53018c191e1ab (patch) | |
tree | a501b3befbaee767bea1be788a8bf7569c175f67 /drivers | |
parent | 19707ca2953b8190de4475f7c7c32949badee191 (diff) | |
download | linux-009324daf6a021cb5978b1bcb8b53018c191e1ab.tar.xz |
staging: wilc1000: remove unnecessary NULL check in clear_shadow_scan()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index ede9134722e3..00a167bd7308 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -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; |