sh-pfc: sh_pfc_probe() sizeof() fix
authorMagnus Damm <damm@opensource.se>
Thu, 14 Feb 2013 12:23:47 +0000 (21:23 +0900)
committerSimon Horman <horms+renesas@verge.net.au>
Sat, 16 Feb 2013 01:58:50 +0000 (10:58 +0900)
Fix sizeof() usage in sh-pfc/core.c to allocate space
for the full data structure instead of a pointer.

Signed-off-by: Magnus Damm <damm@opensource.se>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/pinctrl/sh-pfc/core.c

index d323c24fffafdcd3f329c48c78b74e43d771c4d7..970ddff2b0b6a4eea4abfc3e262ade40f7e8f4a0 100644 (file)
@@ -495,7 +495,7 @@ static int sh_pfc_probe(struct platform_device *pdev)
        if (info == NULL)
                return -ENODEV;
 
-       pfc = devm_kzalloc(&pdev->dev, sizeof(pfc), GFP_KERNEL);
+       pfc = devm_kzalloc(&pdev->dev, sizeof(*pfc), GFP_KERNEL);
        if (pfc == NULL)
                return -ENOMEM;