Skip to content

Commit

Permalink
sh-pfc: sh_pfc_probe() sizeof() fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Simon Horman committed Feb 16, 2013
1 parent c332380 commit 8c43fcc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/pinctrl/sh-pfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 8c43fcc

Please sign in to comment.