From 151c8b920cae9fb114b8e8869e3949bc2435841d Mon Sep 17 00:00:00 2001 From: Ajay Singh Date: Fri, 11 May 2018 13:43:12 +0530 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c index 65ba6edb86f4..1408ebde4196 100644 --- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c +++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c @@ -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; -- 2.45.2