Commit 4c3e962d authored by Wu Fengguang's avatar Wu Fengguang Committed by David S. Miller

stmmac: fix noderef.cocci warnings

drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:115:15-21: ERROR: application of sizeof to pointer

 sizeof when applied to a pointer typed expression gives the size of
 the pointer

Generated by: scripts/coccinelle/misc/noderef.cocci

CC: Giuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d1491fa5
...@@ -112,7 +112,7 @@ static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev) ...@@ -112,7 +112,7 @@ static struct stmmac_axi *stmmac_axi_setup(struct platform_device *pdev)
if (!np) if (!np)
return NULL; return NULL;
axi = kzalloc(sizeof(axi), GFP_KERNEL); axi = kzalloc(sizeof(*axi), GFP_KERNEL);
if (!axi) if (!axi)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment