lkml.org 
[lkml]   [2018]   [Nov]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 05/13] i2c: acpi: Return error pointers from i2c_acpi_new_device()
From
Date
Hi,

On 27-11-18 14:46, Andy Shevchenko wrote:
> On Tue, Nov 27, 2018 at 01:49:53PM +0200, Mika Westerberg wrote:
>> 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 :)
>
> Sounds more traditional than ENXIO.
> I would go the way Mika proposed if there is no objection.

Works for me, go for it.

Regards,

Han

\
 
 \ /
  Last update: 2018-11-27 16:25    [W:0.052 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site