提交 1fb1f054 编写于 作者: M Masahiro Yamada 提交者: Linus Walleij

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: NMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 8b2b3dcb
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册