mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 10:57:46 +00:00
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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
87ff934afd
commit
c078d78aa9
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue