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: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
c0a7882312
commit
151c8b920c
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue