USB: gadget: udc: s3c2410_udc: fix return value check in s3c2410_udc_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 5 Mar 2021 03:49:27 +0000 (03:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:29 +0000 (17:06 +0100)
commit80091541a46b7d9cad70df974291dd544b837555
tree54f2d7028cf1f8b508016be38ee12aafa8ab488c
parentb0db0c76a2ba8f3753120d5880ca58e69dba8f4d
USB: gadget: udc: s3c2410_udc: fix return value check in s3c2410_udc_probe()

commit 414c20df7d401bcf1cb6c13d2dd944fb53ae4acf upstream.

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: 188db4435ac6 ("usb: gadget: s3c: use platform resources")
Cc: stable <stable@vger.kernel.org>
Reported-by: Hulk Robot <hulkci@huawei.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20210305034927.3232386-1-weiyongjun1@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/s3c2410_udc.c