linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mwifiex: uninit wakeup info when failed to add card
@ 2017-07-03  7:54 Jeffy Chen
  2017-07-05 18:08 ` Brian Norris
  0 siblings, 1 reply; 3+ messages in thread
From: Jeffy Chen @ 2017-07-03  7:54 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>

---

 drivers/net/wireless/marvell/mwifiex/main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c
index f2600b8..17d2cbe 100644
--- a/drivers/net/wireless/marvell/mwifiex/main.c
+++ b/drivers/net/wireless/marvell/mwifiex/main.c
@@ -1655,6 +1655,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

end of thread, other threads:[~2017-07-06  8:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-03  7:54 [PATCH] mwifiex: uninit wakeup info when failed to add card Jeffy Chen
2017-07-05 18:08 ` Brian Norris
2017-07-06  8:47   ` jeffy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).