Re: [PATCH v2 1/6] ACPI / bus: Return error code from __acpi_match_device() in one case

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

 



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 dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux