summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-12-28 00:44:04 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-01-03 10:46:55 +0300
commit51d7a036a6b0b3b64aeb4441d71e238ef6fb4a22 (patch)
tree7fd237e279a4c6f78281b249a71777e35210fbd1 /drivers
parentb5623acb8d826545046184fab31049d6cd1deb83 (diff)
downloadlinux-51d7a036a6b0b3b64aeb4441d71e238ef6fb4a22.tar.xz
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 <elfring@users.sourceforge.net> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pinctrl/spear/pinctrl-spear.c4
1 files changed, 1 insertions, 3 deletions
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);