Re: [PATCH v2 05/13] i2c: acpi: Return error pointers from i2c_acpi_new_device()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 27, 2018 at 10:16:25AM +0100, Hans de Goede wrote:
> One problem is that i2c_new_device() currently simply returns NULL on all
> errors. Andy, you could take a look how much work it is to make that return
> an ERR_PTR too, or just check its return value and return ERR_PTR(-ENXIO) if
> it fails for now...

I would use -ENODEV here and -EINVAL in case there is no ACPI companion :)



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux