Skip to content

Commit a431803

Browse files
andy-shevBartosz Golaszewski
authored andcommitted
gpiolib: of: Drop redundant check in of_mm_gpiochip_remove()
The callers never call the function with invalid pointer. Moreover, compiler quite likely dropped that check anyway because we use that pointer before the check. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
1 parent 77289b2 commit a431803

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

drivers/gpio/gpiolib-of.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -961,9 +961,6 @@ void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc)
961961
{
962962
struct gpio_chip *gc = &mm_gc->gc;
963963

964-
if (!mm_gc)
965-
return;
966-
967964
gpiochip_remove(gc);
968965
iounmap(mm_gc->regs);
969966
kfree(gc->label);

0 commit comments

Comments
 (0)