mirror of https://gitee.com/openkylin/linux.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 <damm@opensource.se> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
This commit is contained in:
parent
c3323806a6
commit
8c43fcc780
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue