diff options
author | Jinpeng Cui <cui.jinpeng2@zte.com.cn> | 2022-08-29 13:29:53 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2022-09-03 17:01:09 +0200 |
commit | a21cd7d63be70f55b3c66d00dfa8d0138446c8ff (patch) | |
tree | 6174ed7f664a8160a791437eb16f27c4025835b0 /net/wireless | |
parent | wifi: mac80211: Support POWERED_ADDR_CHANGE feature (diff) | |
download | linux-a21cd7d63be70f55b3c66d00dfa8d0138446c8ff.tar.xz linux-a21cd7d63be70f55b3c66d00dfa8d0138446c8ff.zip |
wifi: nl80211: remove redundant err variable
Return value from rdev_set_mcast_rate() directly instead of
taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/nl80211.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index dad88d231d56..4f5e5b763a15 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -11279,7 +11279,6 @@ static int nl80211_set_mcast_rate(struct sk_buff *skb, struct genl_info *info) struct net_device *dev = info->user_ptr[1]; int mcast_rate[NUM_NL80211_BANDS]; u32 nla_rate; - int err; if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_ADHOC && dev->ieee80211_ptr->iftype != NL80211_IFTYPE_MESH_POINT && @@ -11298,9 +11297,7 @@ static int nl80211_set_mcast_rate(struct sk_buff *skb, struct genl_info *info) if (!nl80211_parse_mcast_rate(rdev, mcast_rate, nla_rate)) return -EINVAL; - err = rdev_set_mcast_rate(rdev, dev, mcast_rate); - - return err; + return rdev_set_mcast_rate(rdev, dev, mcast_rate); } static struct sk_buff * |