forked from Minki/linux
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>
This commit is contained in:
parent
8b2b3dcb34
commit
1fb1f0540d
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user