[U-Boot] [PATCH 05/10] dm: pci: Adjust pci_find_and_bind_driver() to return -EPERM

Simon Glass sjg at chromium.org
Sun Oct 18 14:28:16 CEST 2015


On 14 September 2015 at 06:15, Bin Meng <bmeng.cn at gmail.com> wrote:
> On Wed, Sep 9, 2015 at 7:52 AM, Simon Glass <sjg at chromium.org> wrote:
>> 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 at chromium.org>
>> ---
>>
>>  drivers/pci/pci-uclass.c | 31 +++++++++++++++++++------------
>>  1 file changed, 19 insertions(+), 12 deletions(-)
[snip]
> Reviewed-by: Bin Meng <bmeng.cn at gmail.com>

Applied to u-boot-x86.


More information about the U-Boot mailing list