From: Magnus Damm Date: Thu, 14 Feb 2013 12:23:47 +0000 (+0900) Subject: sh-pfc: sh_pfc_probe() sizeof() fix X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=8c43fcc7804fc4609ccd9fa021e21f5423db9d96;p=deliverable%2Flinux.git sh-pfc: sh_pfc_probe() sizeof() fix 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 Acked-by: Laurent Pinchart Acked-by: Linus Walleij Signed-off-by: Simon Horman --- diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index d323c24fffaf..970ddff2b0b6 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -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;