From: Robert Baldyga Date: Mon, 13 Jul 2015 09:03:54 +0000 (+0200) Subject: usb: gadget: atmel_usba_udc: add missing ret value check X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7674cba55ad66b2565f8abe8d081a6ea4269bfb6;p=linux-beck.git 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 Acked-by: Nicolas Ferre Acked-by: Michal Nazarewicz Signed-off-by: Felipe Balbi --- 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);