From 51d7a036a6b0b3b64aeb4441d71e238ef6fb4a22 Mon Sep 17 00:00:00 2001 From: Markus Elfring Date: Wed, 27 Dec 2017 22:44:04 +0100 Subject: pinctrl: spear: Delete an error message for a failed memory allocation in spear_pinctrl_probe() Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Acked-by: Viresh Kumar Signed-off-by: Linus Walleij --- drivers/pinctrl/spear/pinctrl-spear.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'drivers/pinctrl/spear') diff --git a/drivers/pinctrl/spear/pinctrl-spear.c b/drivers/pinctrl/spear/pinctrl-spear.c index 4db52ba38d8d..efe79d3f7659 100644 --- a/drivers/pinctrl/spear/pinctrl-spear.c +++ b/drivers/pinctrl/spear/pinctrl-spear.c @@ -361,10 +361,8 @@ int spear_pinctrl_probe(struct platform_device *pdev, return -ENODEV; pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL); - if (!pmx) { - dev_err(&pdev->dev, "Can't alloc spear_pmx\n"); + if (!pmx) return -ENOMEM; - } res = platform_get_resource(pdev, IORESOURCE_MEM, 0); pmx->vbase = devm_ioremap_resource(&pdev->dev, res); -- cgit v1.2.3