UPSTREAM: 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>

Bug: 253289327
Change-Id: I51b4422895e8ddd9522f8e2c4ea3c8131989f32c
(cherry picked from commit a21cd7d63be70f55b3c66d00dfa8d0138446c8ff)
Signed-off-by: Kiran Kumar Lokere <quic_klokere@quicinc.com>
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
Jinpeng Cui
2022-08-29 11:29:53 +00:00
committed by Todd Kjos
parent acf72eda07
commit 20d705c31e

View File

@@ -11262,7 +11262,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 &&
@@ -11281,9 +11280,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 *