2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-01 00:54:15 +08:00

gpiolib: Drop duplicate offset check in gpiochip_is_requested()

gpiochip_get_desc() already does the check, drop a duplicate in
gpiochip_is_requested().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
Andy Shevchenko 2021-05-10 22:52:21 +03:00 committed by Bartosz Golaszewski
parent e7d8fde4ab
commit f2e03ca3e8

View File

@ -2004,9 +2004,6 @@ const char *gpiochip_is_requested(struct gpio_chip *gc, unsigned int offset)
{
struct gpio_desc *desc;
if (offset >= gc->ngpio)
return NULL;
desc = gpiochip_get_desc(gc, offset);
if (IS_ERR(desc))
return NULL;