On Tue, Jan 27, 2015 at 11:50 PM, Uwe Kleine-König
<[email protected]> wrote:
> 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 <[email protected]>
Patch applied.
But...
> - if (!pin_reg || !pin_reg->conf_reg) {
> + if (!pin_reg || pin_reg->conf_reg == -1) {
I can see that the other code checks for -1 in this variable.
But where is conf_reg ever set to -1?
freescale]$ git grep "\-1"
pinctrl-imx.c: if (pin_reg->mux_reg == -1) {
pinctrl-imx.c: if (pin_reg->mux_reg == -1)
pinctrl-imx.c: if (pin_reg->mux_reg == -1)
pinctrl-imx.c: if (pin_reg->conf_reg == -1) {
pinctrl-imx.c: if (pin_reg->conf_reg == -1) {
pinctrl-imx.c: if (!pin_reg || pin_reg->conf_reg == -1) {
Only checked for, never assigned.
Yours,
Linus Walleij
--
To unsubscribe from this list: send the line "unsubscribe linux-gpio" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html