Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c43fcc7 authored by Magnus Damm's avatar Magnus Damm Committed by Simon Horman
Browse files

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: default avatarMagnus Damm <damm@opensource.se>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
parent c3323806
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;