Commit 419517f1 authored by Markus Elfring's avatar Markus Elfring Committed by Linus Walleij

pinctrl: adi2: Delete an error message for a failed memory allocation in two functions

Omit an extra message for a memory allocation failure in these functions.

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 cb1a42d5
...@@ -830,10 +830,8 @@ static int adi_gpio_pint_probe(struct platform_device *pdev) ...@@ -830,10 +830,8 @@ static int adi_gpio_pint_probe(struct platform_device *pdev)
struct gpio_pint *pint; struct gpio_pint *pint;
pint = devm_kzalloc(dev, sizeof(struct gpio_pint), GFP_KERNEL); pint = devm_kzalloc(dev, sizeof(struct gpio_pint), GFP_KERNEL);
if (!pint) { if (!pint)
dev_err(dev, "Memory alloc failed\n");
return -ENOMEM; return -ENOMEM;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
pint->base = devm_ioremap_resource(dev, res); pint->base = devm_ioremap_resource(dev, res);
...@@ -946,10 +944,8 @@ static int adi_gpio_probe(struct platform_device *pdev) ...@@ -946,10 +944,8 @@ static int adi_gpio_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
port = devm_kzalloc(dev, sizeof(struct gpio_port), GFP_KERNEL); port = devm_kzalloc(dev, sizeof(struct gpio_port), GFP_KERNEL);
if (!port) { if (!port)
dev_err(dev, "Memory alloc failed\n");
return -ENOMEM; return -ENOMEM;
}
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
port->base = devm_ioremap_resource(dev, res); port->base = devm_ioremap_resource(dev, res);
......
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