Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1682143 > unrolled thread
| Started by | Jeffy Chen <jeffy.chen@rock-chips.com> |
|---|---|
| First post | 2017-07-06 10:00 +0200 |
| Last post | 2017-07-06 19:20 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2] mwifiex: uninit wakeup info in the error handling Jeffy Chen <jeffy.chen@rock-chips.com> - 2017-07-06 10:00 +0200
Re: [PATCH v2] mwifiex: uninit wakeup info in the error handling Brian Norris <briannorris@chromium.org> - 2017-07-06 19:20 +0200
| From | Jeffy Chen <jeffy.chen@rock-chips.com> |
|---|---|
| Date | 2017-07-06 10:00 +0200 |
| Subject | [PATCH v2] mwifiex: uninit wakeup info in the error handling |
| Message-ID | <u09RD-1qm-1@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Brian Norris <briannorris@chromium.org> |
|---|---|
| Date | 2017-07-06 19:20 +0200 |
| Message-ID | <u0iBA-8tF-7@gated-at.bofh.it> |
| In reply to | #1682143 |
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>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web