Skip to content

Commit

Permalink
pinctrl: exynos5440: fix invalid use of sizeof in exynos5440_pinctrl_…
Browse files Browse the repository at this point in the history
…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 <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
  • Loading branch information
Wei Yongjun authored and Linus Walleij committed Mar 27, 2013
1 parent 87ff934 commit c078d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/pinctrl-exynos5440.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c078d78

Please sign in to comment.