]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: make library immune to error pointers
authorLinus Walleij <linus.walleij@linaro.org>
Thu, 16 Jun 2016 09:55:55 +0000 (11:55 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Jun 2016 16:12:19 +0000 (18:12 +0200)
commit4d9eb0e7b22d0b7bbebcc1166c26aa02fd832987
tree051573607cf58ae0f743f2dc6b96ee3f308de840
parent0283566dd47eadb58667cd0ffd26d60b4fe184f2
gpio: make library immune to error pointers

Most functions that take a GPIO descriptor in need to check the
descriptor for IS_ERR(). We do this mostly in the VALIDATE_DESC()
macro except for the gpiod_to_irq() function which needs special
handling.

Cc: stable@vger.kernel.org
Reported-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c