This reverts commit
b970ac68e0c4 ("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: Johannes Berg <johannes.berg@intel.com>
*/
/* Add vendor data */
- err = nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_TEST, val + 1);
- if (err)
- return err;
+ nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_TEST, val + 1);
+
/* Send the event - this will call nla_nest_end() */
cfg80211_vendor_event(skb, GFP_KERNEL);
}