linux/drivers/pinctrl/freescale
Stefan Agner 9999fe5df5 pinctrl: imx: reset group index on probe
Group index is incremented on every new group parsed. Since the
field is part of struct imx_pinctrl_soc_info, which is typically
a global variable passed by the individual pinctrl-imx.c based
driver, it does not get cleared automatically when re-probing the
driver. This lead imx_pinctrl_parse_functions passing a group
pointer which is outside of the allocated group space on second
probe and onwards. Typically this ended up in a NULL pointer
dereference when accessing the name field like this:
Unable to handle kernel NULL pointer dereference at virtual address 00000000
...
PC is at strcmp+0x18/0x44
LR is at imx_dt_node_to_map+0xc4/0x290

Avoid this by setting group_index to 0 on probe.

This has been observed when using DEBUG_TEST_DRIVER_REMOVE.

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2016-10-31 21:25:15 +01:00
..
Kconfig pinctrl: imx: Kconfig: PINCTRL_IMX select REGMAP 2016-04-14 14:19:00 +02:00
Makefile pinctrl: imx: add i.mx6ul subdriver 2015-07-16 09:39:02 +02:00
pinctrl-imx1-core.c pinctrl: freescale: remove needless module.h include 2016-06-29 09:30:10 +02:00
pinctrl-imx1.c pinctrl: imx1: make it explicitly non-modular 2016-06-29 09:31:03 +02:00
pinctrl-imx1.h pinctrl: imxl: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:21 +02:00
pinctrl-imx6dl.c pinctrl: imx6dl: make it explicitly non-modular 2016-06-29 09:38:40 +02:00
pinctrl-imx6q.c pinctrl: imx6q: make it explicitly non-modular 2016-06-29 09:49:20 +02:00
pinctrl-imx6sl.c pinctrl: imx6sl: make it explicitly non-modular 2016-06-29 09:50:10 +02:00
pinctrl-imx6sx.c pinctrl: imx6sx: make it explicitly non-modular 2016-06-29 09:51:08 +02:00
pinctrl-imx6ul.c pinctrl: imx6ul: make it explicitly non-modular 2016-06-29 09:52:01 +02:00
pinctrl-imx7d.c pinctrl: imx7d: make it explicitly non-modular 2016-06-29 09:52:59 +02:00
pinctrl-imx21.c pinctrl: imx21: Remove the MODULE_DEVICE_TABLE() macro 2016-07-06 15:41:31 +02:00
pinctrl-imx23.c pinctrl: imx23: make it explicitly non-modular 2016-06-29 09:54:37 +02:00
pinctrl-imx25.c pinctrl: imx25: make it explicitly non-modular 2016-06-29 09:32:59 +02:00
pinctrl-imx27.c pinctrl: imx27: make it explicitly non-modular 2016-06-29 09:34:01 +02:00
pinctrl-imx28.c pinctrl: imx28: make it explicitly non-modular 2016-06-29 09:55:30 +02:00
pinctrl-imx35.c pinctrl: imx35: make it explicitly non-modular 2016-06-29 09:34:52 +02:00
pinctrl-imx50.c pinctrl: imx50: make it explicitly non-modular 2016-06-29 09:35:48 +02:00
pinctrl-imx51.c pinctrl: imx51: make it explicitly non-modular 2016-06-29 09:36:53 +02:00
pinctrl-imx53.c pinctrl: imx53: make it explicitly non-modular 2016-06-29 09:37:44 +02:00
pinctrl-imx.c pinctrl: imx: reset group index on probe 2016-10-31 21:25:15 +01:00
pinctrl-imx.h pinctrl: imx: Use devm_pinctrl_register() for pinctrl registration 2016-04-21 00:02:17 +02:00
pinctrl-mxs.c pinctrl: remove orphaned exported ".remove" function 2016-06-29 09:56:28 +02:00
pinctrl-mxs.h pinctrl: remove orphaned exported ".remove" function 2016-06-29 09:56:28 +02:00
pinctrl-vf610.c pinctrl: vf610: make it explicitly non-modular 2016-06-29 09:53:48 +02:00