Commit 420cf17d authored by Sergio Paracuellos's avatar Sergio Paracuellos Committed by Linus Walleij

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarSergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20201213161721.6514-6-sergio.paracuellos@gmail.comSigned-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 09f8101d
......@@ -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++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment