diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2015-01-27 23:50:25 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-03-23 21:02:53 -0400 |
commit | 248f2c55b4369308e90db4ab8e3f71d187fa441c (patch) | |
tree | 374906ec4459b087d190f18f499a7d61182716b8 | |
parent | a5754abd4f4141d346ede748391364ce6882c870 (diff) |
pinctrl: pinctrl-imx: don't use invalid value of conf_reg
commit 4ff0f034e95d65f8f063a362dfcf86e986377a82 upstream.
The right check for conf_reg to be invalid it testing against -1 not 0
as is done in the rest of the driver.
This fixes an oops that can be triggered by:
cat /sys/kernel/debug/pinctrl/43fac000.iomuxc/*
Fixes: ae75ff814538 ("pinctrl: pinctrl-imx: add imx pinctrl core driver")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/pinctrl/freescale/pinctrl-imx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/freescale/pinctrl-imx.c b/drivers/pinctrl/freescale/pinctrl-imx.c index f2446769247f..6f806f93662a 100644 --- a/drivers/pinctrl/freescale/pinctrl-imx.c +++ b/drivers/pinctrl/freescale/pinctrl-imx.c @@ -365,7 +365,7 @@ static void imx_pinconf_dbg_show(struct pinctrl_dev *pctldev, const struct imx_pin_reg *pin_reg = &info->pin_regs[pin_id]; unsigned long config; - if (!pin_reg || !pin_reg->conf_reg) { + if (!pin_reg || pin_reg->conf_reg == -1) { seq_printf(s, "N/A"); return; } |