Commit c11a0442 authored by Vincent Stehlé's avatar Vincent Stehlé Committed by Linus Walleij

pinctrl: intel: merrifield: fix dup size in probe

In function mrfld_pinctrl_probe(), when duplicating the mrfld_families
array the requested memory region length is multiplied once too many by the
number of elements in the original array. Fix this to spare some memory.

Fixes: 4e80c8f5 ("pinctrl: intel: Add Intel Merrifield pin controller support")
Signed-off-by: default avatarVincent Stehlé <vincent.stehle@intel.com>
Acked-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 9395452b
...@@ -854,7 +854,7 @@ static int mrfld_pinctrl_probe(struct platform_device *pdev) ...@@ -854,7 +854,7 @@ static int mrfld_pinctrl_probe(struct platform_device *pdev)
*/ */
nfamilies = ARRAY_SIZE(mrfld_families), nfamilies = ARRAY_SIZE(mrfld_families),
families = devm_kmemdup(&pdev->dev, mrfld_families, families = devm_kmemdup(&pdev->dev, mrfld_families,
nfamilies * sizeof(mrfld_families), sizeof(mrfld_families),
GFP_KERNEL); GFP_KERNEL);
if (!families) if (!families)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment