All of lore.kernel.org
 help / color / mirror / Atom feed
From: jeffy <jeffy.chen@rock-chips.com>
To: Brian Norris <briannorris@chromium.org>
Cc: linux-wireless@vger.kernel.org, akarwar@marvell.com,
	Xinming Hu <huxm@marvell.com>, Kalle Valo <kvalo@codeaurora.org>,
	Ganapathi Bhat <gbhat@marvell.com>,
	Amitkumar Karwar <amitkarwar@gmail.com>,
	linux-kernel@vger.kernel.org,
	Nishant Sarmukadam <nishants@marvell.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH] mwifiex: uninit wakeup info when failed to add card
Date: Thu, 06 Jul 2017 16:47:29 +0800	[thread overview]
Message-ID: <595DF921.2020108@rock-chips.com> (raw)
In-Reply-To: <20170705180813.GA115427@google.com>

Hi brian,

On 07/06/2017 02:08 AM, Brian Norris wrote:
> On Mon, Jul 03, 2017 at 03:54:30PM +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
>
> Yeah, I noticed I hadn't covered all the error cases, so your change is
> part of the fix. But you're not covering the error paths when the
> firmware doesn't load correctly -- this happens asynchronously to
> mwifiex_add_card(). i.e., you need to fixup the error paths in
> _mwifiex_fw_dpc() too.
right, so we need to uninit it before every mwifiex_free_adapter :)
>
> Brian
>
>> 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
>>
>>
>
>
>

      reply	other threads:[~2017-07-06  8:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=595DF921.2020108@rock-chips.com \
    --to=jeffy.chen@rock-chips.com \
    --cc=akarwar@marvell.com \
    --cc=amitkarwar@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=gbhat@marvell.com \
    --cc=huxm@marvell.com \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nishants@marvell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.