Skip to contentSkip to conversation

pinctrl: pinctrl-imx: don't use invalid value of conf_reg

PATCH New Uwe Kleine-König 1 participant 2 messages Jan 27, 2015

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: pinctrl-imx: don't use invalid value of conf_reg

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")

---

Notes:
Resent to fix email address of Dong Aisheng

 drivers/pinctrl/freescale/pinctrl-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/freescale/pinctrl-imx.c +1 -1
index 52f2b9404fe0..448f10986c28 100644
@@ -437,7 +437,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;
 	}
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 pinctrl: pinctrl-imx: don't use invalid value of conf_reg

Quoted 1 line · Uwe Kleine-K?nig

Resent to fix email address of Dong Aisheng

I failed here and reused his old address again, please disregard this mail. Sorry for the noise (again, sigh).

Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |