diff options
author | Stefano Babic <sbabic@denx.de> | 2019-03-31 19:54:10 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-03-31 19:54:10 +0200 |
commit | 66c433ed4342e5761ee9b048c85fe47d31130b2e (patch) | |
tree | 60977b825765ebe490b01aae2154002eeea6a76b /drivers/usb/gadget/udc/udc-uclass.c | |
parent | 4b387deb78dcbe491c1f73fdd758f4ca3307bbbe (diff) | |
parent | c3aef9339ce0592b06c8d44cf2eaf9e6f3713e4f (diff) |
Merge branch 'master' of git://git.denx.de/u-boot
Signed-off-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/usb/gadget/udc/udc-uclass.c')
-rw-r--r-- | drivers/usb/gadget/udc/udc-uclass.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/gadget/udc/udc-uclass.c b/drivers/usb/gadget/udc/udc-uclass.c index 8d7864797a..3053ccf7d9 100644 --- a/drivers/usb/gadget/udc/udc-uclass.c +++ b/drivers/usb/gadget/udc/udc-uclass.c @@ -23,8 +23,11 @@ int usb_gadget_initialize(int index) return 0; ret = uclass_get_device_by_seq(UCLASS_USB_GADGET_GENERIC, index, &dev); if (!dev || ret) { - pr_err("No USB device found\n"); - return -ENODEV; + ret = uclass_get_device(UCLASS_USB_GADGET_GENERIC, index, &dev); + if (!dev || ret) { + pr_err("No USB device found\n"); + return -ENODEV; + } } dev_array[index] = dev; return 0; |