Skip to content

Commit

Permalink
wifi: nl80211: remove redundant err variable
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jinpeng Cui authored and Johannes Berg committed Sep 3, 2022
1 parent 3c06e91 commit a21cd7d
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/wireless/nl80211.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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 *
Expand Down

0 comments on commit a21cd7d

Please sign in to comment.