1
0
Fork 0

pinctrl: return -ENOMEM instead of -EINVAL for kasprintf() failure

-ENOMEM is more suitable error code because kasprintf() fails
in case of memory shortage.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
hifive-unleashed-5.1
Masahiro Yamada 2016-05-25 20:14:13 +09:00 committed by Linus Walleij
parent 8b2b3dcb34
commit 1fb1f0540d
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ int pinmux_request_gpio(struct pinctrl_dev *pctldev,
/* Conjure some name stating what chip and pin this is taken by */
owner = kasprintf(GFP_KERNEL, "%s:%d", range->name, gpio);
if (!owner)
return -EINVAL;
return -ENOMEM;
ret = pin_request(pctldev, pin, owner, range);
if (ret < 0)