summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2017-12-25 18:28:02 +0100
committerLinus Walleij <linus.walleij@linaro.org>2018-01-03 08:46:52 +0100
commit405e64a1cdd953f2f0474d2f131757226bcbc401 (patch)
treed47af2f65f776fa2e65e361ddeb02f7bd6bb3ba8 /drivers/pinctrl
parent8c017679ab772b2f4f1c8fc8c12917cb2e18cab4 (diff)
pinctrl: tz1090-pdc: 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: 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-tz1090-pdc.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-tz1090-pdc.c b/drivers/pinctrl/pinctrl-tz1090-pdc.c
index 5cfa93cecf73..b16d1c96b7eb 100644
--- a/drivers/pinctrl/pinctrl-tz1090-pdc.c
+++ b/drivers/pinctrl/pinctrl-tz1090-pdc.c
@@ -357,10 +357,8 @@ static int add_map_configs(struct device *dev,
dup_configs = kmemdup(configs, num_configs * sizeof(*dup_configs),
GFP_KERNEL);
- if (!dup_configs) {
- dev_err(dev, "kmemdup(configs) failed\n");
+ if (!dup_configs)
return -ENOMEM;
- }
/*
* We support both pins and pin groups, but we need to figure out which
@@ -931,10 +929,9 @@ static int tz1090_pdc_pinctrl_probe(struct platform_device *pdev)
struct resource *res;
pmx = devm_kzalloc(&pdev->dev, sizeof(*pmx), GFP_KERNEL);
- if (!pmx) {
- dev_err(&pdev->dev, "Can't alloc tz1090_pdc_pmx\n");
+ if (!pmx)
return -ENOMEM;
- }
+
pmx->dev = &pdev->dev;
spin_lock_init(&pmx->lock);