> >>
> >> +#ifdef CONFIG_USB_PHY
> >> +  if (!hcd->phy) {
> >> +          struct usb_phy *phy = usb_get_phy_dev(hcd->self.controller,
> >> 0);
> >> +
> >> +          if (IS_ERR(phy)) {
> >> +                  retval = PTR_ERR(phy);
> >> +                  if (retval == -EPROBE_DEFER)
> >> +                          return retval;
> >> +          } else {
> >> +                  retval = usb_phy_init(phy);
> >> +                  if (retval) {
> >> +                          usb_put_phy(phy);
> >> +                          return retval;
> >> +                  }
> >> +                  hcd->phy = phy;
> >> +                  hcd->remove_phy = 1;
> >> +          }
> >> +  }
> >> +#endif
> >> +
> >
> > If the platform doesn't has phy driver, and with CONFIG_USB_PHY enabled,
> it
> > will have problem for above code.
> >
> 
> It shouldn't have any problems since there's no phy bound to the HCD in
> this case.
> Thus, usb_get_phy_dev returns -ENODEV and the HCD will be added as usual.
> 
Yes, my fault. The retval will be override later.

Peter


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to