gpiolib: Drop duplicate offset check in gpiochip_is_requested()
PATCH 1/1 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 <[email protected]>
--- drivers/gpio/gpiolib.c | 3 --- 1 file changed, 3 deletions(-)
drivers/gpio/gpiolib.c +0 -3
@@ -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 ;
Signature · 1 line
2.30.2
Quoted 4 lines · Andy Shevchenko
gpiochip_get_desc()already does the check, drop a duplicate ingpiochip_is_requested().Signed-off-by Andy Shevchenko <[email protected]>
Reviewed-by Linus Walleij <[email protected]>
Yours,
Linus Walleij
Bartosz Golaszewski
AppliedQuoted 24 lines · Andy Shevchenko
gpiochip_get_desc()already does the check, drop a duplicate ingpiochip_is_requested().Signed-off-by Andy Shevchenko <[email protected]>--- drivers/gpio/gpiolib.c | 3 --- 1 file changed, 3 deletions(-)drivers/gpio/gpiolib.c +0
-4@@ -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 ; --
Quoted 2 lines
2.30.2
I applied this some time ago just forgot to comment here.
Bart