summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-05-10 22:52:21 +0300
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2021-05-12 14:43:00 +0300
commitf2e03ca3e839e2a2d80c4c764ab07b293ad5a576 (patch)
tree401d8e4f5dda942be702d99a695487a76385464d /drivers/gpio/gpiolib.c
parente7d8fde4ab50bfe354c4a1a55096b408ce0ffcec (diff)
downloadlinux-f2e03ca3e839e2a2d80c4c764ab07b293ad5a576.tar.xz
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>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 1427c1be749b..220a9d8dd4e3 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;