usb: fotg210: fix return value check in fotg210_probe()
authorYang Yingliang <yangyingliang@huawei.com>
Mon, 30 Jan 2023 12:06:33 +0000 (20:06 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 31 Jan 2023 09:39:03 +0000 (10:39 +0100)
commit21ef9c91f0ab4f11d31fddbdc6d886fed114be74
tree8b12c93b3aaa219ed87f392c8213851aa20e3064
parent8cb9c36b812591e36405708d0ee693b1c135fcbd
usb: fotg210: fix return value check in fotg210_probe()

devm_platform_get_and_ioremap_resource() never returns NULL pointer,
it will return ERR_PTR() when it fails, so replace the check with
IS_ERR().

Fixes: baef5330d35b ("usb: fotg210: Acquire memory resource in core")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230130120633.3342285-1-yangyingliang@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/fotg210/fotg210-core.c