mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
staging: wilc1000: fix error path cleanup in wilc_wlan_initialize()
[ Upstream commit6419f818ab] For the error path in wilc_wlan_initialize(), the resources are not cleanup in the correct order. Reverted the previous changes and use the correct order to free during error condition. Fixes:b46d68825c("staging: wilc1000: remove COMPLEMENT_BOOT") Cc: <stable@vger.kernel.org> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
60b856dc17
commit
ba8701d222
@@ -649,17 +649,17 @@ static int wilc_wlan_initialize(struct net_device *dev, struct wilc_vif *vif)
|
||||
goto fail_locks;
|
||||
}
|
||||
|
||||
if (wl->gpio_irq && init_irq(dev)) {
|
||||
ret = -EIO;
|
||||
goto fail_locks;
|
||||
}
|
||||
|
||||
ret = wlan_initialize_threads(dev);
|
||||
if (ret < 0) {
|
||||
ret = -EIO;
|
||||
goto fail_wilc_wlan;
|
||||
}
|
||||
|
||||
if (wl->gpio_irq && init_irq(dev)) {
|
||||
ret = -EIO;
|
||||
goto fail_threads;
|
||||
}
|
||||
|
||||
if (!wl->dev_irq_num &&
|
||||
wl->hif_func->enable_interrupt &&
|
||||
wl->hif_func->enable_interrupt(wl)) {
|
||||
@@ -715,7 +715,7 @@ fail_irq_enable:
|
||||
fail_irq_init:
|
||||
if (wl->dev_irq_num)
|
||||
deinit_irq(dev);
|
||||
|
||||
fail_threads:
|
||||
wlan_deinitialize_threads(dev);
|
||||
fail_wilc_wlan:
|
||||
wilc_wlan_cleanup(dev);
|
||||
|
||||
Reference in New Issue
Block a user