Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 364740
b: refs/heads/master
c: d105e7f
h: refs/heads/master
v: v3
  • Loading branch information
Felipe Balbi committed Mar 18, 2013
1 parent d4b438c commit 933aa07
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 817e5f33d0c12f24bdfebe88c96ca2e968756da4
refs/heads/master: d105e7f86f890a530cdefc2a715121345de30dc2
24 changes: 22 additions & 2 deletions trunk/drivers/usb/dwc3/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,32 @@ static int dwc3_probe(struct platform_device *pdev)
dwc->usb3_phy = devm_usb_get_phy(dev, USB_PHY_TYPE_USB3);
}

if (IS_ERR_OR_NULL(dwc->usb2_phy)) {
if (IS_ERR(dwc->usb2_phy)) {
ret = PTR_ERR(dwc->usb2_phy);

/*
* if -ENXIO is returned, it means PHY layer wasn't
* enabled, so it makes no sense to return -EPROBE_DEFER
* in that case, since no PHY driver will ever probe.
*/
if (ret == -ENXIO)
return ret;

dev_err(dev, "no usb2 phy configured\n");
return -EPROBE_DEFER;
}

if (IS_ERR_OR_NULL(dwc->usb3_phy)) {
if (IS_ERR(dwc->usb3_phy)) {
ret = PTR_ERR(dwc->usb2_phy);

/*
* if -ENXIO is returned, it means PHY layer wasn't
* enabled, so it makes no sense to return -EPROBE_DEFER
* in that case, since no PHY driver will ever probe.
*/
if (ret == -ENXIO)
return ret;

dev_err(dev, "no usb3 phy configured\n");
return -EPROBE_DEFER;
}
Expand Down

0 comments on commit 933aa07

Please sign in to comment.