Home
last modified time | relevance | path

Searched hist:"5 dbcf3a0f91b1d7612ede730736efe696edf4d85" (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/pci/
H A Dpci-uclass.c5dbcf3a0f91b1d7612ede730736efe696edf4d85 Tue Sep 08 23:52:49 UTC 2015 Simon Glass <sjg@chromium.org> dm: pci: Adjust pci_find_and_bind_driver() to return -EPERM

The current code returns 0 even if it failed to find or bind a driver. The
caller then has to check the returned device to see if it is NULL. It is
better to return an error code in this case so that it is clear what
happened.

Adjust the code to return -EPERM, indicating that the device was not bound
because it is not needed for pre-relocation use. Add comments so that the
return value is clear.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>