public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf
@ 2012-05-14 11:06 Dong Aisheng
  2012-05-14 11:06 ` [PATCH 2/5] pinctrl: make pinmux disable function optional Dong Aisheng
                   ` (5 more replies)
  0 siblings, 6 replies; 11+ messages in thread
From: Dong Aisheng @ 2012-05-14 11:06 UTC (permalink / raw)
  To: linux-kernel
  Cc: linux-arm-kernel, linus.walleij, swarren, haojian.zhuang,
	shawn.guo

From: Dong Aisheng <dong.aisheng@linaro.org>

Also checking invalid num_configs when validate the pinconf map.

Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org>
---
 drivers/pinctrl/pinconf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/pinconf.c b/drivers/pinctrl/pinconf.c
index 7ce139e..43f474c 100644
--- a/drivers/pinctrl/pinconf.c
+++ b/drivers/pinctrl/pinconf.c
@@ -50,9 +50,9 @@ int pinconf_validate_map(struct pinctrl_map const *map, int i)
 		return -EINVAL;
 	}
 
-	if (map->data.configs.num_configs &&
+	if (!map->data.configs.num_configs ||
 			!map->data.configs.configs) {
-		pr_err("failed to register map %s (%d): no configs ptr given\n",
+		pr_err("failed to register map %s (%d): no configs given\n",
 		       map->name, i);
 		return -EINVAL;
 	}
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-05-15  8:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 11:06 [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf Dong Aisheng
2012-05-14 11:06 ` [PATCH 2/5] pinctrl: make pinmux disable function optional Dong Aisheng
2012-05-15  7:45   ` Linus Walleij
2012-05-14 11:06 ` [PATCH 3/5] pinctrl: pinctrl-imx: remove empty pinmux disable function Dong Aisheng
2012-05-15  7:47   ` Linus Walleij
2012-05-14 11:06 ` [PATCH 4/5] pinctrl: pinctrl-mxs: " Dong Aisheng
2012-05-15  7:48   ` Linus Walleij
2012-05-14 11:06 ` [PATCH 5/5] pinctrl: pinctrl-pxa3xx: " Dong Aisheng
2012-05-15  8:00   ` Linus Walleij
2012-05-14 23:31 ` [PATCH 1/5] pinctrl: a minor error checking improvement for pinconf Stephen Warren
2012-05-15  7:44 ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox