Commit 151c8b92 authored by Ajay Singh's avatar Ajay Singh Committed by Greg Kroah-Hartman
Browse files

staging: wilc1000: use kmalloc(sizeof(*mgmt_tx)...) in mgmt_tx()



Fix below checkpatch issue found in mgmt_tx()

Prefer kmalloc(sizeof(*mgmt_tx)...) over kmalloc(sizeof(struct
p2p_mgmt_data)...)

Signed-off-by: default avatarAjay Singh <ajay.kathat@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c0a78823
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1622,7 +1622,7 @@ static int mgmt_tx(struct wiphy *wiphy,
	if (!ieee80211_is_mgmt(mgmt->frame_control))
		goto out;

	mgmt_tx = kmalloc(sizeof(struct p2p_mgmt_data), GFP_KERNEL);
	mgmt_tx = kmalloc(sizeof(*mgmt_tx), GFP_KERNEL);
	if (!mgmt_tx) {
		ret = -ENOMEM;
		goto out;