netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: phy: at803x: fix coccinelle warnings
@ 2014-06-22 10:32 Daniel Mack
  2014-06-23  0:16 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Mack @ 2014-06-22 10:32 UTC (permalink / raw)
  To: netdev, f.fainelli; +Cc: davem, marek.belisko, ujhelyi.m, Fengguang Wu

From: Fengguang Wu <fengguang.wu@intel.com>

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: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Daniel Mack <zonque@gmail.com>
---
 drivers/net/phy/at803x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
index 3cbd82f..fdc1b41 100644
--- a/drivers/net/phy/at803x.c
+++ b/drivers/net/phy/at803x.c
@@ -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;
 
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-23  0:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-22 10:32 [PATCH] net: phy: at803x: fix coccinelle warnings Daniel Mack
2014-06-23  0:16 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).