[PATCH] pinctrl: add error message to pinmux_map_to_setting's error path

DORMANTno replies

From: John Crispin <hidden>
Date: 2012-04-23 17:40:06
Subsystem: pin control subsystem, the rest · Maintainers: Linus Walleij, Linus Torvalds

If a non existent mux group is referenced inside a devicetree, we see no error.

This patch adds the same type of error message that pinconf_map_to_setting()
gives when the pin/group is unknown.

Signed-off-by: John Crispin <redacted>
Cc: Stephen Warren <redacted>

---
 drivers/pinctrl/pinmux.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/pinctrl/pinmux.c b/drivers/pinctrl/pinmux.c
index 1056e68..7c840fb 100644
--- a/drivers/pinctrl/pinmux.c
+++ b/drivers/pinctrl/pinmux.c
@@ -349,8 +349,11 @@ int pinmux_map_to_setting(struct pinctrl_map const *map,
 				break;
 			}
 		}
-		if (!found)
+		if (!found) {
+			dev_err(pctldev->dev, "could not find mux group \"%s\"",
+				group);
 			return -EINVAL;
+		}
 	} else {
 		group = groups[0];
 	}
-- 
1.7.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help