summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorRobert Baldyga <r.baldyga@samsung.com>2015-07-13 11:03:54 +0200
committerFelipe Balbi <balbi@ti.com>2015-07-31 08:58:03 -0500
commit7674cba55ad66b2565f8abe8d081a6ea4269bfb6 (patch)
treeb468cede9941dc8a706708fe03651586d1d6c4ad /drivers/usb
parentcb009d6e0b800e3834cd5e306df90d84e08f9cf7 (diff)
downloadlinux-7674cba55ad66b2565f8abe8d081a6ea4269bfb6.tar.bz2
usb: gadget: atmel_usba_udc: add missing ret value check
Add missing return value check. In case of error print debug message and return error code. Signed-off-by: Robert Baldyga <r.baldyga@samsung.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/atmel_usba_udc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 4095cce05e6a..37d414ec2d69 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1989,6 +1989,10 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc");
ret = of_property_read_string(pp, "name", &name);
+ if (ret) {
+ dev_err(&pdev->dev, "of_probe: name error(%d)\n", ret);
+ goto err;
+ }
ep->ep.name = name;
ep->ep_regs = udc->regs + USBA_EPT_BASE(i);