OSDN Git Service

pinctrl: freescale: imx: fix bogus check of of_iomap() return value
authorVladimir Zapolskiy <vz@mleia.com>
Wed, 9 Mar 2016 00:45:36 +0000 (02:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2016 06:42:08 +0000 (15:42 +0900)
commit2e638de516983b9575c845e878e1c41f5bcd2509
treec21472d9d511d3dbbbd5c199e237073244e0b393
parente7c6abc464ac71ca734ea57a778872793d51ff29
pinctrl: freescale: imx: fix bogus check of of_iomap() return value

commit 9a4f424531dabd877259ae0071b8bcc4dede9eb5 upstream.

On error path of_iomap() returns NULL, hence IS_ERR() check is invalid
and may cause a NULL pointer dereference, the change fixes this
problem.

While we are here invert a device node check to simplify the code.

Fixes: 26d8cde5260b ("pinctrl: freescale: imx: add shared input select reg support")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pinctrl/freescale/pinctrl-imx.c