From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Crispin Subject: [PATCH] pinctrl: add error message to pinmux_map_to_setting's error path Date: Mon, 23 Apr 2012 19:40:06 +0200 Message-ID: <1335202806-19520-1-git-send-email-blogic@openwrt.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: Linus Walleij Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org List-Id: devicetree@vger.kernel.org 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 Cc: Stephen Warren --- 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