drivers: staging : wlan-ng : collect return status without variable
PATCH v2 1/1 drivers: staging : wlan-ng : collect return status without variable
As caller rdev_set_default_key not particular about -EFAULT. We can preserve the return value of prism2_domibset_uint32.
-----
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(-)
drivers/staging/wlan-ng/cfg80211.c +3 -6
@@ -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,
Signature · 1 line
2.7.4
Quoted 20 lines · Hariprasad Kelam
As caller
rdev_set_default_keynot particular about-EFAULT. We can preserve the return value ofprism2_domibset_uint32.Signed-off-by Hariprasad Kelam <[email protected]>-----
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(-)drivers/staging/wlan-ng/cfg80211.c +0
-1@@ -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,
drivers/staging/wlan-ng/cfg80211.c static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, · line 238
Quoted 10 lines
drivers/staging/wlan-ng/cfg80211.c +3
-5- 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