Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Magnus Damm and committed by
Simon Horman
8c43fcc7 c3323806

+1 -1
+1 -1
drivers/pinctrl/sh-pfc/core.c
··· 495 495 if (info == NULL) 496 496 return -ENODEV; 497 497 498 - pfc = devm_kzalloc(&pdev->dev, sizeof(pfc), GFP_KERNEL); 498 + pfc = devm_kzalloc(&pdev->dev, sizeof(*pfc), GFP_KERNEL); 499 499 if (pfc == NULL) 500 500 return -ENOMEM; 501 501