summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/udc
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2014-10-29 17:18:55 +0300
committerFelipe Balbi <balbi@ti.com>2014-11-03 19:01:24 +0300
commita2655e4a8edb66d21b0967940172e83a51d30ef3 (patch)
tree329335675429de2e210be869ed882aac8e6679e7 /drivers/usb/gadget/udc
parent8b920f16e69550d3f6c7c67dc3cef42aafca498d (diff)
downloadlinux-a2655e4a8edb66d21b0967940172e83a51d30ef3.tar.xz
usb: gadget: fix ptr_ret.cocci warnings
drivers/usb/gadget/udc/r8a66597-udc.c:1849:1-3: WARNING: PTR_ERR_OR_ZERO can be used Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Generated by: scripts/coccinelle/api/ptr_ret.cocci Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc')
-rw-r--r--drivers/usb/gadget/udc/r8a66597-udc.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c
index b63a527baf13..be31b57a8ba1 100644
--- a/drivers/usb/gadget/udc/r8a66597-udc.c
+++ b/drivers/usb/gadget/udc/r8a66597-udc.c
@@ -1845,10 +1845,7 @@ static int r8a66597_sudmac_ioremap(struct r8a66597 *r8a66597,
res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "sudmac");
r8a66597->sudmac_reg = devm_ioremap_resource(&pdev->dev, res);
- if (IS_ERR(r8a66597->sudmac_reg))
- return PTR_ERR(r8a66597->sudmac_reg);
-
- return 0;
+ return PTR_ERR_OR_ZERO(r8a66597->sudmac_reg);
}
static int r8a66597_probe(struct platform_device *pdev)