From: Hariprasad Kelam Date: Sun, 12 May 2019 10:53:45 +0000 (+0530) Subject: drivers: staging : wlan-ng : collect return status without variable X-Git-Tag: v5.15~5977^2~516 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0f74b45d64dff40e5dff87e160be20cd96dc1d8;p=platform%2Fkernel%2Flinux-starfive.git 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. Signed-off-by: Hariprasad Kelam Reviewed-by: Dan Carpenter ---- Changes in v2: - remove masking of original return value with EFAULT Changes in v3: - merge patch v1 and v2 sothat it can be applied on linux-next Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/wlan-ng/cfg80211.c b/drivers/staging/wlan-ng/cfg80211.c index 8a862f718d5c..eee1998c4b18 100644 --- a/drivers/staging/wlan-ng/cfg80211.c +++ b/drivers/staging/wlan-ng/cfg80211.c @@ -231,17 +231,9 @@ static int prism2_set_default_key(struct wiphy *wiphy, struct net_device *dev, { struct wlandevice *wlandev = dev->ml_priv; - int err = 0; - int result = 0; - - result = prism2_domibset_uint32(wlandev, - DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, - key_index); - - if (result) - err = -EFAULT; - - return err; + return prism2_domibset_uint32(wlandev, + DIDMIB_DOT11SMT_PRIVACYTABLE_WEPDEFAULTKEYID, + key_index); } static int prism2_get_station(struct wiphy *wiphy, struct net_device *dev,