projects
/
platform
/
kernel
/
linux-rpi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8a2221
)
pinctrl: single: Fix a couple error codes
author
Dan Carpenter
<dan.carpenter@oracle.com>
Wed, 16 Nov 2016 11:41:51 +0000
(14:41 +0300)
committer
Linus Walleij
<linus.walleij@linaro.org>
Wed, 16 Nov 2016 19:56:19 +0000
(20:56 +0100)
We should return -ENOMEM instead of success if pcs_add_function() fails.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/pinctrl-single.c
patch
|
blob
|
history
diff --git
a/drivers/pinctrl/pinctrl-single.c
b/drivers/pinctrl/pinctrl-single.c
index
2b196e5
..
a5a0392
100644
(file)
--- a/
drivers/pinctrl/pinctrl-single.c
+++ b/
drivers/pinctrl/pinctrl-single.c
@@
-1181,8
+1181,10
@@
static int pcs_parse_one_pinctrl_entry(struct pcs_device *pcs,
pgnames[0] = np->name;
function = pcs_add_function(pcs, np, np->name, vals, found, pgnames, 1);
- if (!function)
+ if (!function) {
+ res = -ENOMEM;
goto free_pins;
+ }
res = pcs_add_pingroup(pcs, np, np->name, pins, found);
if (res < 0)
@@
-1313,8
+1315,10
@@
static int pcs_parse_bits_in_pinctrl_entry(struct pcs_device *pcs,
pgnames[0] = np->name;
function = pcs_add_function(pcs, np, np->name, vals, found, pgnames, 1);
- if (!function)
+ if (!function) {
+ res = -ENOMEM;
goto free_pins;
+ }
res = pcs_add_pingroup(pcs, np, np->name, pins, found);
if (res < 0)