summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-12-25 13:27:55 +0300
committerLinus Walleij <linus.walleij@linaro.org>2018-01-03 10:46:51 +0300
commita14aa2716bac1d934cce9fa86beb5d7720f1b3dc (patch)
tree93c96d371a6b5789d1f4ad055c00f306617ad05e /drivers/pinctrl
parent85dc397a2441dd0ea6f01732310b0609f444bdc5 (diff)
downloadlinux-a14aa2716bac1d934cce9fa86beb5d7720f1b3dc.tar.xz
pinctrl: single: Delete an error message for a failed memory allocation in pcs_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> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinctrl-single.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/pinctrl/pinctrl-single.c b/drivers/pinctrl/pinctrl-single.c
index 6f95e6a74e72..2b93d8a07687 100644
--- a/drivers/pinctrl/pinctrl-single.c
+++ b/drivers/pinctrl/pinctrl-single.c
@@ -1646,10 +1646,9 @@ static int pcs_probe(struct platform_device *pdev)
return -EINVAL;
pcs = devm_kzalloc(&pdev->dev, sizeof(*pcs), GFP_KERNEL);
- if (!pcs) {
- dev_err(&pdev->dev, "could not allocate\n");
+ if (!pcs)
return -ENOMEM;
- }
+
pcs->dev = &pdev->dev;
pcs->np = np;
raw_spin_lock_init(&pcs->lock);