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 <[email protected]> Acked-by: Linus Walleij <[email protected]> Reviewed-by: Dmitry Torokhov <[email protected]> Signed-off-by: Bartosz Golaszewski <[email protected]>
1 parent 77289b2 commit a431803

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

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)