提交 f101d964 编写于 作者: J Jeffy Chen 提交者: Kalle Valo

mwifiex: uninit wakeup info in the error handling

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:
36908c4e mwifiex: uninit wakeup info when removing device
Signed-off-by: NJeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: NBrian Norris <briannorris@chromium.org>
Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
上级 f46a5b01
......@@ -667,8 +667,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);
......@@ -1668,6 +1671,8 @@ mwifiex_add_card(void *card, struct completion *fw_done,
mwifiex_free_cmd_buffers(adapter);
}
err_kmalloc:
if (adapter->irq_wakeup >= 0)
device_init_wakeup(adapter->dev, false);
mwifiex_free_adapter(adapter);
err_init_sw:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册