Commit b18b2e77 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Walleij

pinctrl: tegra: Delete two error messages for a failed memory allocation in tegra_pinctrl_probe()

Omit extra messages for a memory allocation failure in this function.

This issue was detected by using the Coccinelle software.
Signed-off-by: default avatarMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 51d7a036
...@@ -666,10 +666,9 @@ int tegra_pinctrl_probe(struct platform_device *pdev, ...@@ -666,10 +666,9 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
int fn, gn, gfn; int fn, gn, gfn;
pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
if (!pmx) { if (!pmx)
dev_err(&pdev->dev, "Can't alloc tegra_pmx\n");
return -ENOMEM; return -ENOMEM;
}
pmx->dev = &pdev->dev; pmx->dev = &pdev->dev;
pmx->soc = soc_data; pmx->soc = soc_data;
...@@ -722,10 +721,8 @@ int tegra_pinctrl_probe(struct platform_device *pdev, ...@@ -722,10 +721,8 @@ int tegra_pinctrl_probe(struct platform_device *pdev,
pmx->regs = devm_kzalloc(&pdev->dev, pmx->nbanks * sizeof(*pmx->regs), pmx->regs = devm_kzalloc(&pdev->dev, pmx->nbanks * sizeof(*pmx->regs),
GFP_KERNEL); GFP_KERNEL);
if (!pmx->regs) { if (!pmx->regs)
dev_err(&pdev->dev, "Can't alloc regs pointer\n");
return -ENOMEM; return -ENOMEM;
}
for (i = 0; i < pmx->nbanks; i++) { for (i = 0; i < pmx->nbanks; i++) {
res = platform_get_resource(pdev, IORESOURCE_MEM, i); res = platform_get_resource(pdev, IORESOURCE_MEM, i);
......
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