staging: wilc1000: add set to null after release firmware

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>
This commit is contained in:
Leo Kim 2016-04-01 17:44:17 +09:00 committed by Greg Kroah-Hartman
parent a2c28de5c0
commit 3f626cf4a8
1 changed files with 3 additions and 1 deletions

View 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);