aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2014-07-19 23:41:53 -0400
committerFelipe Balbi <balbi@ti.com>2014-08-19 10:27:24 -0400
commit4b11f88821aff3e780cb3eac3a48270551e41167 (patch)
tree4277de7e92e5b33e0fc7259bbd7508c5797c64aa /drivers/usb
parent7042e8f2f6f5c76b6173748570312bbeb044c7dd (diff)
usb: gadget: Fix return value check in r8a66597_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(). Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/r8a66597-udc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
index 46008421c1ec..de2a8713b428 100644
--- a/drivers/usb/gadget/udc/r8a66597-udc.c
+++ b/drivers/usb/gadget/udc/r8a66597-udc.c
@@ -1868,8 +1868,8 @@ static int r8a66597_probe(struct platform_device *pdev)
1868 1868
1869 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1869 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1870 reg = devm_ioremap_resource(&pdev->dev, res); 1870 reg = devm_ioremap_resource(&pdev->dev, res);
1871 if (!reg) 1871 if (IS_ERR(reg))
1872 return -ENODEV; 1872 return PTR_ERR(reg);
1873 1873
1874 ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0); 1874 ires = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
1875 irq = ires->start; 1875 irq = ires->start;