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)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 30 Mar 2016 08:57:52 +0000 (10:57 +0200)
commit9a4f424531dabd877259ae0071b8bcc4dede9eb5
treebe0a10359a0d1672f1c1459e5a944e74d14ab3e5
parent5e7515ba78fff2f5407eaa2f97c1d5c07801ac3d
pinctrl: freescale: imx: fix bogus check of of_iomap() return value

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>
drivers/pinctrl/freescale/pinctrl-imx.c