summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/pinmux.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-05-25 13:14:13 +0200
committerLinus Walleij <linus.walleij@linaro.org>2016-05-31 10:33:00 +0200
commit1fb1f0540deae634d454f917e3d45c27b69521a8 (patch)
tree626f4315ec6d90a083ce3ab72edfce3ea390aba9 /drivers/pinctrl/pinmux.c
parentpinctrl: digicolor: add missing platform_set_drvdata() call (diff)
downloadlinux-1fb1f0540deae634d454f917e3d45c27b69521a8.tar.xz
linux-1fb1f0540deae634d454f917e3d45c27b69521a8.zip
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>
Diffstat (limited to 'drivers/pinctrl/pinmux.c')
-rw-r--r--drivers/pinctrl/pinmux.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index d94d76ca5651..ece702881946 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -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)