aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2012-11-12 20:00:07 -0500
committerLinus Walleij <linus.walleij@linaro.org>2012-11-15 06:03:07 -0500
commit8d1c6ef67a4530ee5dbd5038d2959a54593013b1 (patch)
tree1a88a7c3a4f82e984e5235af1ac09796130b343f
parent102caad905d919cc981f8ce799e5a63b6889b979 (diff)
pinctrl: imx: Fix the logic checking if not able to find pin reg map
Current code sets "pin_reg = &info->pin_regs[i];" in each loop iteration, so in the case of no-match, pin_reg is not NULL. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Dong Aisheng <dong.aisheng@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/pinctrl/pinctrl-imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index f3d2384b34bf..525a2c8644f6 100644
--- a/drivers/pinctrl/pinctrl-imx.c
+++ b/drivers/pinctrl/pinctrl-imx.c
@@ -71,7 +71,7 @@ static const struct imx_pin_reg *imx_find_pin_reg(
71 break; 71 break;
72 } 72 }
73 73
74 if (!pin_reg) { 74 if (i == info->npin_regs) {
75 dev_err(info->dev, "Pin(%s): unable to find pin reg map\n", 75 dev_err(info->dev, "Pin(%s): unable to find pin reg map\n",
76 info->pins[pin].name); 76 info->pins[pin].name);
77 return NULL; 77 return NULL;