]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
pci: Abort early if bus does not exist
authorThierry Reding <treding@nvidia.com>
Thu, 13 Nov 2014 01:26:48 +0000 (18:26 -0700)
committerTom Rini <trini@ti.com>
Sun, 23 Nov 2014 11:49:01 +0000 (06:49 -0500)
commit042b83d4c502d17db40f1fa4f6d9b6cb86c653d2
tree86cbfb791811558f5834e5570dec666e9bc8fe29
parent1eebd14b79024f34925b79cb264242fac1bdc1b9
pci: Abort early if bus does not exist

When listing the devices on a PCI bus, the current code will blindly try
to access all devices. Internally this causes pci_bus_to_hose() to be
repeatedly called and output an error message every time. Prevent this
by calling pci_bus_to_hose() once and abort early if no bus was found.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
common/cmd_pci.c