Commit 7674cba5 authored by Robert Baldyga's avatar Robert Baldyga Committed by Felipe Balbi

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: default avatarRobert Baldyga <r.baldyga@samsung.com>
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent cb009d6e
...@@ -1989,6 +1989,10 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev, ...@@ -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"); ep->can_isoc = of_property_read_bool(pp, "atmel,can-isoc");
ret = of_property_read_string(pp, "name", &name); 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.name = name;
ep->ep_regs = udc->regs + USBA_EPT_BASE(i); ep->ep_regs = udc->regs + USBA_EPT_BASE(i);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment