gpio: mlxbf2: fix return value check in mlxbf2_gpio_get_lock_res()
authorWei Yongjun <weiyongjun1@huawei.com>
Mon, 27 Apr 2020 11:08:29 +0000 (11:08 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:37 +0000 (17:48 +0200)
commit95298fff3b1e716732d853e62ec911727bd529e3
treebe0985e6c84896110c9e8e5cab8132aed8dedd89
parent94364e0304ff8f74db0c55d2769a6a5389730b0b
gpio: mlxbf2: fix return value check in mlxbf2_gpio_get_lock_res()

[ Upstream commit 66d8ad67aab3bc6f55e7de81565cd0d4875bd851 ]

In case of error, the function devm_ioremap() returns NULL pointer not
ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20200427110829.154785-1-weiyongjun1@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-mlxbf2.c