提交 8f2877ca 编写于 作者: F Fengguang Wu 提交者: David S. Miller

net: phy: at803x: fix coccinelle warnings

drivers/net/phy/at803x.c:196:26-32: 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
Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
Acked-by: NDaniel Mack <zonque@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 960b1f45
......@@ -193,7 +193,7 @@ static int at803x_probe(struct phy_device *phydev)
struct device *dev = &phydev->dev;
struct at803x_priv *priv;
priv = devm_kzalloc(dev, sizeof(priv), GFP_KERNEL);
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
if (!priv)
return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册