]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: udc: lpc32xx: fix return value check in lpc32xx_udc_probe()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 4 May 2019 07:04:07 +0000 (07:04 +0000)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 6 Jun 2019 10:51:57 +0000 (13:51 +0300)
commitb9cd85714ef0b37aa7fd06e191a4c453266de076
tree5966ef7f933145b039929f0482b1a640d1d56911
parentbc00067e454dcefd8ef9a6ef5aaf97ce445b7c50
usb: gadget: udc: lpc32xx: fix return value check in lpc32xx_udc_probe()

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

This issue was detected by using the Coccinelle software.

Fixes: 56abc4120238 ("usb: gadget: udc: lpc32xx: simplify probe")
Acked-by: Sylvain Lemieux <slemieux.tyco@gmail.com>
Acked-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/udc/lpc32xx_udc.c