linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback
@ 2016-07-01 19:39 Javier Martinez Canillas
  2016-07-04  0:18 ` Julian Calaby
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-07-01 19:39 UTC (permalink / raw)
  To: linux-kernel
  Cc: Javier Martinez Canillas, Amitkumar Karwar, Kalle Valo, netdev,
	linux-wireless, Nishant Sarmukadam

The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added
interface") attempted to fix an issue when a new AP interface is added.

But the patch didn't check the return value of the functions doing the
firmware calls and returned an error even if the functions didn't fail.

This prevents the network device to be registered properly, so fix it.

Fixes: commit 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
---

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

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index 99e8cf1ad610..5de9f63e2c01 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -2865,9 +2865,11 @@ struct wireless_dev *mwifiex_add_virtual_intf(struct wiphy *wiphy,
 
 	ret = mwifiex_send_cmd(priv, HostCmd_CMD_SET_BSS_MODE,
 			       HostCmd_ACT_GEN_SET, 0, NULL, true);
+	if (ret)
 		return ERR_PTR(ret);
 
 	ret = mwifiex_sta_init_cmd(priv, false, false);
+	if (ret)
 		return ERR_PTR(ret);
 
 	mwifiex_setup_ht_caps(&wiphy->bands[NL80211_BAND_2GHZ]->ht_cap, priv);
-- 
2.5.5

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback
  2016-07-01 19:39 [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback Javier Martinez Canillas
@ 2016-07-04  0:18 ` Julian Calaby
  2016-07-05 13:09 ` Kalle Valo
  2016-07-05 13:28 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Julian Calaby @ 2016-07-04  0:18 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Amitkumar Karwar, Kalle Valo, netdev,
	linux-wireless, Nishant Sarmukadam

Hi All,

On Sat, Jul 2, 2016 at 5:39 AM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added
> interface") attempted to fix an issue when a new AP interface is added.
>
> But the patch didn't check the return value of the functions doing the
> firmware calls and returned an error even if the functions didn't fail.
>
> This prevents the network device to be registered properly, so fix it.
>
> Fixes: commit 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

Looks correct to me as Dan Carpenter submitted the same fix.

Reviewed-by: Julian Calaby <julian.calaby@gmail.com>

Thanks,

-- 
Julian Calaby

Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback
  2016-07-01 19:39 [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback Javier Martinez Canillas
  2016-07-04  0:18 ` Julian Calaby
@ 2016-07-05 13:09 ` Kalle Valo
  2016-07-05 13:14   ` Javier Martinez Canillas
  2016-07-05 13:28 ` Kalle Valo
  2 siblings, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2016-07-05 13:09 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Amitkumar Karwar, netdev, linux-wireless,
	Nishant Sarmukadam

Javier Martinez Canillas <javier@osg.samsung.com> writes:

> The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added
> interface") attempted to fix an issue when a new AP interface is added.
>
> But the patch didn't check the return value of the functions doing the
> firmware calls and returned an error even if the functions didn't fail.
>
> This prevents the network device to be registered properly, so fix it.
>
> Fixes: commit 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>

The fixes line should be:

Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")

I can fix that before I apply the patch.

-- 
Kalle Valo

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback
  2016-07-05 13:09 ` Kalle Valo
@ 2016-07-05 13:14   ` Javier Martinez Canillas
  0 siblings, 0 replies; 5+ messages in thread
From: Javier Martinez Canillas @ 2016-07-05 13:14 UTC (permalink / raw)
  To: Kalle Valo
  Cc: linux-kernel, Amitkumar Karwar, netdev, linux-wireless,
	Nishant Sarmukadam

Hello Kalle,

On 07/05/2016 09:09 AM, Kalle Valo wrote:
> Javier Martinez Canillas <javier@osg.samsung.com> writes:
> 
>> The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added
>> interface") attempted to fix an issue when a new AP interface is added.
>>
>> But the patch didn't check the return value of the functions doing the
>> firmware calls and returned an error even if the functions didn't fail.
>>
>> This prevents the network device to be registered properly, so fix it.
>>
>> Fixes: commit 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> 
> The fixes line should be:
> 
> Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
> 
> I can fix that before I apply the patch.
> 

Sigh, it was a copy and paste error when I copied the SHA-1 from the
commit message. Sorry about that and thanks for taking care of this.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: mwifiex: fix unconditional error return in .add_virtual_intf callback
  2016-07-01 19:39 [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback Javier Martinez Canillas
  2016-07-04  0:18 ` Julian Calaby
  2016-07-05 13:09 ` Kalle Valo
@ 2016-07-05 13:28 ` Kalle Valo
  2 siblings, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2016-07-05 13:28 UTC (permalink / raw)
  To: Javier Martinez Canillas
  Cc: linux-kernel, Javier Martinez Canillas, Amitkumar Karwar, netdev,
	linux-wireless, Nishant Sarmukadam

Javier Martinez Canillas <javier@osg.samsung.com> wrote:
> The commit 7311ea850079 ("mwifiex: fix AP start problem for newly added
> interface") attempted to fix an issue when a new AP interface is added.
> 
> But the patch didn't check the return value of the functions doing the
> firmware calls and returned an error even if the functions didn't fail.
> 
> This prevents the network device to be registered properly, so fix it.
> 
> Fixes: 7311ea850079 ("mwifiex: fix AP start problem for newly added interface")
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> Reviewed-by: Julian Calaby <julian.calaby@gmail.com>

Thanks, 1 patch applied to wireless-drivers-next.git:

f152bdad6208 mwifiex: fix unconditional error return in .add_virtual_intf callback

-- 
Sent by pwcli
https://patchwork.kernel.org/patch/9210355/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-07-05 13:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-01 19:39 [PATCH] mwifiex: fix unconditional error return in .add_virtual_intf callback Javier Martinez Canillas
2016-07-04  0:18 ` Julian Calaby
2016-07-05 13:09 ` Kalle Valo
2016-07-05 13:14   ` Javier Martinez Canillas
2016-07-05 13:28 ` Kalle Valo

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).