LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [Patch v2] drivers: staging : wlan-ng : collect return status without variable
@ 2019-05-11  9:48 Hariprasad Kelam
  2019-05-11 20:47 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Hariprasad Kelam @ 2019-05-11  9:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Tim Collier, Hariprasad Kelam,
	Chris Opperman, devel, linux-kernel, Dan Carpenter

As caller rdev_set_default_key  not particular about -EFAULT.
We can preserve the return value of prism2_domibset_uint32.

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
-----
Changes in v2:
  - remove  masking of original return value with EFAULT
---
 drivers/staging/wlan-ng/cfg80211.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
index 5dad5ac..4018fc5 100644
--- a/drivers/staging/wlan-ng/cfg80211.c
+++ b/drivers/staging/wlan-ng/cfg80211.c
@@ -231,12 +231,9 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev,
 {
 	struct wlandevice *wlandev = dev->ml_priv;
 
-	if (prism2_domibset_uint32(wlandev,
-				   DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
-				   key_index))
-		return -EFAULT;
-	else
-		return 0;
+	return prism2_domibset_uint32(wlandev,
+				      DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
+				      key_index);
 }
 
 static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,
-- 
2.7.4


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

* Re: [Patch v2] drivers: staging : wlan-ng : collect return status without variable
  2019-05-11  9:48 [Patch v2] drivers: staging : wlan-ng : collect return status without variable Hariprasad Kelam
@ 2019-05-11 20:47 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2019-05-11 20:47 UTC (permalink / raw)
  To: Hariprasad Kelam
  Cc: Greg Kroah-Hartman, Tim Collier, Chris Opperman, devel, linux-kernel

On Sat, May 11, 2019 at 03:18:59PM +0530, Hariprasad Kelam wrote:
> As caller rdev_set_default_key  not particular about -EFAULT.
> We can preserve the return value of prism2_domibset_uint32.
> 
> Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
> -----
> Changes in v2:
>   - remove  masking of original return value with EFAULT
> ---
>  drivers/staging/wlan-ng/cfg80211.c | 9 +++------
>  1 file changed, 3 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c
> index 5dad5ac..4018fc5 100644
> --- a/drivers/staging/wlan-ng/cfg80211.c
> +++ b/drivers/staging/wlan-ng/cfg80211.c
> @@ -231,12 +231,9 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev,
>  {
>  	struct wlandevice *wlandev = dev->ml_priv;
>  
> -	if (prism2_domibset_uint32(wlandev,
> -				   DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
> -				   key_index))
> -		return -EFAULT;
> -	else
> -		return 0;
> +	return prism2_domibset_uint32(wlandev,
> +				      DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID,
> +				      key_index);
>  }
>  

I'm sorry, this patch can only be applied on top of v1, but we need a
patch which can be applied on top of linux-next without applying v1
first.  (Merge/fold the two patches together and resend).

regards,
dan carpenter


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

end of thread, other threads:[~2019-05-11 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-11  9:48 [Patch v2] drivers: staging : wlan-ng : collect return status without variable Hariprasad Kelam
2019-05-11 20:47 ` Dan Carpenter

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