Commit b970ac68 authored by Mukesh Sisodiya's avatar Mukesh Sisodiya Committed by Johannes Berg
Browse files

wifi: mac80211_hwsim: check the return value of nla_put_u32

parent 29c6e2dc
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -582,8 +582,9 @@ static int mac80211_hwsim_vendor_cmd_test(struct wiphy *wiphy,
		 */

		/* Add vendor data */
		nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_TEST, val + 1);

		err = nla_put_u32(skb, QCA_WLAN_VENDOR_ATTR_TEST, val + 1);
		if (err)
			return err;
		/* Send the event - this will call nla_nest_end() */
		cfg80211_vendor_event(skb, GFP_KERNEL);
	}