staging: wilc1000: add set to null after release firmware
authorLeo Kim <leo.kim@atmel.com>
Fri, 1 Apr 2016 08:44:17 +0000 (17:44 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 29 Apr 2016 04:58:42 +0000 (21:58 -0700)
This patch add set to null after release firmware.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c

index 47c01320602b9bae1b74f4a5e9ae441819a4ee67..48bbfa2b15ed0c9f80c94749be647140bfab763c 100644 (file)
@@ -1234,8 +1234,10 @@ void wilc_netdev_cleanup(struct wilc *wilc)
                        vif[i] = netdev_priv(wilc->vif[i]->ndev);
        }
 
-       if (wilc && wilc->firmware)
+       if (wilc && wilc->firmware) {
                release_firmware(wilc->firmware);
+               wilc->firmware = NULL;
+       }
 
        if (wilc && (wilc->vif[0]->ndev || wilc->vif[1]->ndev)) {
                wilc_lock_timeout(wilc, &close_exit_sync, 5 * 1000);