Re: [PATCH] gpiolib: Fix return value of gpio_to_desc() stub if !GPIOLIB

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

 



On Thu, Dec 6, 2018 at 10:45 AM Krzysztof Kozlowski <krzk@xxxxxxxxxx> wrote:

> If CONFIG_GPOILIB is not set, the stub of gpio_to_desc() should return
> the same type of error as regular version: NULL.  All the callers
> compare the return value of gpio_to_desc() against NULL, so returned
> ERR_PTR would be treated as non-error case leading to dereferencing of
> error value.
>
> Fixes: 79a9becda894 ("gpiolib: export descriptor-based GPIO interface")
> Cc: <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: Krzysztof Kozlowski <krzk@xxxxxxxxxx>

Patch applied. I kept the Fixes but removed stable, I do not know
of any regression it is fixing.

Yours,
Linus Walleij



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

  Powered by Linux