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
1 changed files with 0 additions and 3 deletions

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;