projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b2b3dc
)
pinctrl: return -ENOMEM instead of -EINVAL for kasprintf() failure
author
Masahiro Yamada
<yamada.masahiro@socionext.com>
Wed, 25 May 2016 11:14:13 +0000
(20:14 +0900)
committer
Linus Walleij
<linus.walleij@linaro.org>
Tue, 31 May 2016 08:33:00 +0000
(10:33 +0200)
-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>
drivers/pinctrl/pinmux.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/pinmux.c
b/drivers/pinctrl/pinmux.c
index d94d76ca5651106bda1f024f3a6c7b248fa4c362..ece702881946dd849cae2e7adf2c992697b29fdd 100644
(file)
--- 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 -E
INVAL
;
+ return -E
NOMEM
;
ret = pin_request(pctldev, pin, owner, range);
if (ret < 0)