gpiolib: use gpiochip_get_desc() in gpio_ioctl()
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 24 Dec 2019 12:07:02 +0000 (13:07 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Tue, 7 Jan 2020 11:03:28 +0000 (12:03 +0100)
commit2a2cabd8bc1715ceceb9d9566055f4a0a8ff749a
tree6bcb9982a99ba349929e484ef5fb83b4d135a119
parent45e2360480b939173af70a2221ab63ffdaa1d325
gpiolib: use gpiochip_get_desc() in gpio_ioctl()

Unduplicate the offset check by simply calling gpiochip_get_desc() and
checking its return value.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c