diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-11 13:23:26 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | 3f603cbbb8e175e545d6037a783e1ef82bab30f9 (patch) | |
tree | c3122b2be426be9bcfd3285bda86cb175fb9aaeb /drivers/pci | |
parent | b06750501f5c0eef7fef094f13d2f2e313c60b79 (diff) | |
download | u-boot-3f603cbbb8e175e545d6037a783e1ef82bab30f9.tar.gz |
dm: Use uclass_first_device_err() where it is useful
Use this new function in places where it simplifies the code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/pci-uclass.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c index d01bfc12e4..519052efe3 100644 --- a/drivers/pci/pci-uclass.c +++ b/drivers/pci/pci-uclass.c @@ -30,11 +30,9 @@ int pci_get_bus(int busnum, struct udevice **busp) /* Since buses may not be numbered yet try a little harder with bus 0 */ if (ret == -ENODEV) { - ret = uclass_first_device(UCLASS_PCI, busp); + ret = uclass_first_device_err(UCLASS_PCI, busp); if (ret) return ret; - else if (!*busp) - return -ENODEV; ret = uclass_get_device_by_seq(UCLASS_PCI, busnum, busp); } |