Commit 1b78dd34 authored by Johannes Berg's avatar Johannes Berg

Revert "wifi: mac80211_hwsim: check the return value of nla_put_u32"

This reverts commit b970ac68 ("wifi: mac80211_hwsim: check the
return value of nla_put_u32") since it introduced a memory leak in
the error path, which seems worse than sending an incomplete skb,
and the put can't fail anyway since the SKB was just allocated.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent a7a2ef0c
...@@ -582,9 +582,8 @@ static int mac80211_hwsim_vendor_cmd_test(struct wiphy *wiphy, ...@@ -582,9 +582,8 @@ static int mac80211_hwsim_vendor_cmd_test(struct wiphy *wiphy,
*/ */
/* Add vendor data */ /* Add vendor data */
err = nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_TEST, val + 1); nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_TEST, val + 1);
if (err)
return err;
/* Send the event - this will call nla_nest_end() */ /* Send the event - this will call nla_nest_end() */
cfg80211_vendor_event(skb, GFP_KERNEL); cfg80211_vendor_event(skb, GFP_KERNEL);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment