* [PATCH v2] mwifiex: uninit wakeup info in the error handling
@ 2017-07-06 7:55 Jeffy Chen
2017-07-06 17:15 ` Brian Norris
2017-07-28 14:50 ` [v2] " Kalle Valo
0 siblings, 2 replies; 3+ messages in thread
From: Jeffy Chen @ 2017-07-06 7:55 UTC (permalink / raw)
To: linux-wireless, akarwar
Cc: briannorris, Jeffy Chen, Xinming Hu, Kalle Valo, Ganapathi Bhat,
Amitkumar Karwar, linux-kernel, Nishant Sarmukadam, netdev
We inited wakeup info at the beginning of mwifiex_add_card, so we need
to uninit it in the error handling.
It's much the same as what we did in:
36908c4 mwifiex: uninit wakeup info when removing device
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
Changes in v2:
Uninit wakeup when _mwifiex_fw_dpc failed too.
drivers/net/wireless/marvell/mwifiex/main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index f2600b8..097a899 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -665,8 +665,11 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context)
release_firmware(adapter->firmware);
adapter->firmware = NULL;
}
- if (init_failed)
+ if (init_failed) {
+ if (adapter->irq_wakeup >= 0)
+ device_init_wakeup(adapter->dev, false);
mwifiex_free_adapter(adapter);
+ }
/* Tell all current and future waiters we're finished */
complete_all(fw_done);
@@ -1655,6 +1658,8 @@ mwifiex_add_card(void *card, struct completion *fw_done,
mwifiex_shutdown_drv(adapter);
}
err_kmalloc:
+ if (adapter->irq_wakeup >= 0)
+ device_init_wakeup(adapter->dev, false);
mwifiex_free_adapter(adapter);
err_init_sw:
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v2] mwifiex: uninit wakeup info in the error handling
2017-07-06 7:55 [PATCH v2] mwifiex: uninit wakeup info in the error handling Jeffy Chen
@ 2017-07-06 17:15 ` Brian Norris
2017-07-28 14:50 ` [v2] " Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2017-07-06 17:15 UTC (permalink / raw)
To: Jeffy Chen
Cc: linux-wireless, akarwar, Xinming Hu, Kalle Valo, Ganapathi Bhat,
Amitkumar Karwar, linux-kernel, Nishant Sarmukadam, netdev
On Thu, Jul 06, 2017 at 03:55:28PM +0800, Jeffy Chen wrote:
> We inited wakeup info at the beginning of mwifiex_add_card, so we need
> to uninit it in the error handling.
>
> It's much the same as what we did in:
> 36908c4 mwifiex: uninit wakeup info when removing device
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
>
> ---
>
> Changes in v2:
> Uninit wakeup when _mwifiex_fw_dpc failed too.
Looks good to me:
Reviewed-by: Brian Norris <briannorris@chromium.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2] mwifiex: uninit wakeup info in the error handling
2017-07-06 7:55 [PATCH v2] mwifiex: uninit wakeup info in the error handling Jeffy Chen
2017-07-06 17:15 ` Brian Norris
@ 2017-07-28 14:50 ` Kalle Valo
1 sibling, 0 replies; 3+ messages in thread
From: Kalle Valo @ 2017-07-28 14:50 UTC (permalink / raw)
To: Jeffy Chen
Cc: linux-wireless, akarwar, briannorris, Jeffy Chen, Xinming Hu,
Ganapathi Bhat, Amitkumar Karwar, linux-kernel,
Nishant Sarmukadam, netdev
Jeffy Chen <jeffy.chen@rock-chips.com> wrote:
> We inited wakeup info at the beginning of mwifiex_add_card, so we need
> to uninit it in the error handling.
>
> It's much the same as what we did in:
> 36908c4 mwifiex: uninit wakeup info when removing device
>
> Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
> Reviewed-by: Brian Norris <briannorris@chromium.org>
Patch applied to wireless-drivers-next.git, thanks.
f101d9649c42 mwifiex: uninit wakeup info in the error handling
--
https://patchwork.kernel.org/patch/9827589/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-28 14:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06 7:55 [PATCH v2] mwifiex: uninit wakeup info in the error handling Jeffy Chen
2017-07-06 17:15 ` Brian Norris
2017-07-28 14:50 ` [v2] " Kalle Valo
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.