net: phy: at803x: fix coccinelle warnings
authorFengguang Wu <fengguang.wu@intel.com>
Sun, 22 Jun 2014 10:32:51 +0000 (12:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 23 Jun 2014 00:16:02 +0000 (17:16 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/at803x.c

index 3cbd82ffc234f6c1f8ef66d7f22cbad943ab0bdb..fdc1b418fa6a82a434fa305c8785546bc6584ad9 100644 (file)
@@ -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;