On Sun, 2018-02-04 at 08:16 +0100, Rafael J. Wysocki wrote: > On Thu, Feb 1, 2018 at 9:20 PM, Andy Shevchenko > <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote: > > Instead of playing tricks with last invalid entry, > > return simple -ENODATA error code casted to pointer. > > > > It would be good for future in case caller passes NULL pointer for > > ID table. Moreover, caller can check the code to be sure what > > happened > > inside callee. > > - return id; > > + return ERR_PTR(-ENODATA); > > So why is returning id from here a problem? I think you already noticed that in the following patch it becomes a problem if user supply ids == NULL. That's why I added a second paragraph to the commit message to explain. -- Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> Intel Finland Oy -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html