From: Wei Yongjun Date: Thu, 14 Mar 2013 13:59:38 +0000 (+0800) Subject: pinctrl: exynos5440: fix invalid use of sizeof in exynos5440_pinctrl_probe() X-Git-Tag: Ubuntu-snapdragon-4.4.0-1050.54~12697^2~45 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=c078d78aa96ceafab7379b6a50e92d9d8e2f97b5;p=mirror_ubuntu-artful-kernel.git pinctrl: exynos5440: fix invalid use of sizeof in exynos5440_pinctrl_probe() sizeof() when applied to a pointer typed expression gives the size of the pointer, not that of the pointed data. Signed-off-by: Wei Yongjun Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/pinctrl-exynos5440.c b/drivers/pinctrl/pinctrl-exynos5440.c index 169ea3e5f777..eb8e502e11ef 100644 --- a/drivers/pinctrl/pinctrl-exynos5440.c +++ b/drivers/pinctrl/pinctrl-exynos5440.c @@ -854,7 +854,7 @@ static int exynos5440_pinctrl_probe(struct platform_device *pdev) return -ENODEV; } - priv = devm_kzalloc(dev, sizeof(priv), GFP_KERNEL); + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); if (!priv) { dev_err(dev, "could not allocate memory for private data\n"); return -ENOMEM;