提交 8c43fcc7 编写于 作者: M Magnus Damm 提交者: Simon Horman

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: NMagnus Damm <damm@opensource.se>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NSimon Horman <horms+renesas@verge.net.au>
上级 c3323806
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册