[PATCH -next] USB: gadget: udc: s3c2410_udc: fix return value check in s3c2410_udc_probe()

Arnd Bergmann arnd at arndb.de
Fri Mar 5 08:07:07 GMT 2021


On Fri, Mar 5, 2021 at 4:49 AM 'Wei Yongjun <weiyongjun1 at huawei.com> wrote:
>
> From: Wei Yongjun <weiyongjun1 at huawei.com>
>
> 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")
> Reported-by: Hulk Robot <hulkci at huawei.com>
> Signed-off-by: Wei Yongjun <weiyongjun1 at huawei.com>

Nice find, thanks for fixing it!

Reviewed-by: Arnd Bergmann <arnd at arndb.de>



More information about the linux-arm-kernel mailing list