OSDN Git Service

pinctrl: nuvoton: Fix return value check in wpcm450_gpio_register()
authorJialin Zhang <zhangjialin11@huawei.com>
Thu, 17 Mar 2022 06:58:51 +0000 (14:58 +0800)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 24 Mar 2022 19:10:32 +0000 (20:10 +0100)
commit283fb4ea08c5876150b4158e9c20c14309214ce2
treeea8a1712dfe48653b4adffec8fb7045fcb2eeece
parentce2076ba209e5e5258b71c44065988d8f7fa2976
pinctrl: nuvoton: Fix return value check in wpcm450_gpio_register()

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

Fixes: a1d1e0e3d80a ("pinctrl: nuvoton: Add driver for WPCM450")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20220317065851.495394-1-zhangjialin11@huawei.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/nuvoton/pinctrl-wpcm450.c