summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/ralink
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2020-12-13 17:17:18 +0100
committerLinus Walleij <linus.walleij@linaro.org>2021-01-04 15:38:34 +0100
commit420cf17d975d93973ba80807ea49760ba14feaa9 (patch)
tree36627484927d0ca97bb36ea301c913e333de2830 /drivers/pinctrl/ralink
parent09f8101d319a42164b3d1270d2ccbdc156db806a (diff)
pinctrl: ralink: rt2880: delete not needed error message
When '-ENOMEM' is returned there is not need at all to add custom error messages. Hence delete it. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20201213161721.6514-6-sergio.paracuellos@gmail.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/ralink')
-rw-r--r--drivers/pinctrl/ralink/pinctrl-rt2880.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pinctrl/ralink/pinctrl-rt2880.c b/drivers/pinctrl/ralink/pinctrl-rt2880.c
index 3c3336b724ca..4725aa34328a 100644
--- a/drivers/pinctrl/ralink/pinctrl-rt2880.c
+++ b/drivers/pinctrl/ralink/pinctrl-rt2880.c
@@ -279,10 +279,8 @@ static int rt2880_pinmux_pins(struct rt2880_priv *p)
/* the pads needed to tell pinctrl about our pins */
p->pads = devm_kcalloc(p->dev, p->max_pins,
sizeof(struct pinctrl_pin_desc), GFP_KERNEL);
- if (!p->pads || !p->gpio) {
- dev_err(p->dev, "Failed to allocate gpio data\n");
+ if (!p->pads || !p->gpio)
return -ENOMEM;
- }
memset(p->gpio, 1, sizeof(u8) * p->max_pins);
for (i = 0; i < p->func_count; i++) {