]> git.itanic.dy.fi Git - linux-stable/commit
gpio: idt3243x: Fix return value check in idt_gpio_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 8 Jun 2021 14:38:53 +0000 (14:38 +0000)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 11 Jun 2021 18:57:59 +0000 (20:57 +0200)
commit622096fdff79458436b7387a86a5c9f000785e4f
tree15a9b862d0c12f790d3f77bd2c09155e59f54f38
parent354cb6465a9b04df1e99a43fdd22881ad5c91843
gpio: idt3243x: Fix return value check in idt_gpio_probe()

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

Fixes: 4195926aedca ("gpio: Add support for IDT 79RC3243x GPIO controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
drivers/gpio/gpio-idt3243x.c