Skip to content

Commit

Permalink
usb: gadget: atmel_usba_udc: add missing ret value check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Baldyga authored and Felipe Balbi committed Jul 31, 2015
1 parent cb009d6 commit 7674cba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/usb/gadget/udc/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 7674cba

Please sign in to comment.