* [PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map
@ 2012-11-13 1:00 Axel Lin
2012-11-13 6:37 ` Dong Aisheng
2012-11-15 11:04 ` Linus Walleij
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2012-11-13 1:00 UTC (permalink / raw)
To: Linus Walleij; +Cc: Shawn Guo, Dong Aisheng, Devendra Naga, linux-kernel
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>
---
drivers/pinctrl/pinctrl-imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
index f3d2384..525a2c8 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(
break;
}
- if (!pin_reg) {
+ if (i == info->npin_regs) {
dev_err(info->dev, "Pin(%s): unable to find pin reg map\n",
info->pins[pin].name);
return NULL;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map
2012-11-13 1:00 [PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map Axel Lin
@ 2012-11-13 6:37 ` Dong Aisheng
2012-11-15 11:04 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Dong Aisheng @ 2012-11-13 6:37 UTC (permalink / raw)
To: Axel Lin
Cc: Linus Walleij, Shawn Guo, Dong Aisheng, Devendra Naga, linux-kernel
On Tue, Nov 13, 2012 at 09:00:07AM +0800, Axel Lin wrote:
> 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>
Thanks for the fix.
Acked-by: Dong Aisheng <dong.aisheng@linaro.org>
Regards
Dong Aisheng
> ---
> drivers/pinctrl/pinctrl-imx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pinctrl/pinctrl-imx.c b/drivers/pinctrl/pinctrl-imx.c
> index f3d2384..525a2c8 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(
> break;
> }
>
> - if (!pin_reg) {
> + if (i == info->npin_regs) {
> dev_err(info->dev, "Pin(%s): unable to find pin reg map\n",
> info->pins[pin].name);
> return NULL;
> --
> 1.7.9.5
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map
2012-11-13 1:00 [PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map Axel Lin
2012-11-13 6:37 ` Dong Aisheng
@ 2012-11-15 11:04 ` Linus Walleij
1 sibling, 0 replies; 3+ messages in thread
From: Linus Walleij @ 2012-11-15 11:04 UTC (permalink / raw)
To: Axel Lin; +Cc: Shawn Guo, Dong Aisheng, Devendra Naga, linux-kernel
On Tue, Nov 13, 2012 at 2:00 AM, Axel Lin <axel.lin@ingics.com> wrote:
> 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>
Thanks, applied with Dong's ACK.
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-15 11:04 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13 1:00 [PATCH] pinctrl: imx: Fix the logic checking if not able to find pin reg map Axel Lin
2012-11-13 6:37 ` Dong Aisheng
2012-11-15 11:04 ` Linus Walleij
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).