diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-11-14 21:46:26 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2022-11-15 13:53:13 +0300 |
commit | a431803852de00d8d3c143b19f5690254225538f (patch) | |
tree | 8f0e94513a371b8014124d0b256a5ee958bde871 /drivers/gpio/gpiolib-of.c | |
parent | 77289b2f5aa3535a2e49b448c6afb36f5526016a (diff) | |
download | linux-a431803852de00d8d3c143b19f5690254225538f.tar.xz |
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>
Diffstat (limited to 'drivers/gpio/gpiolib-of.c')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index c9b0c9fdeca8..a6871859a59d 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -961,9 +961,6 @@ void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc) { struct gpio_chip *gc = &mm_gc->gc; - if (!mm_gc) - return; - gpiochip_remove(gc); iounmap(mm_gc->regs); kfree(gc->label); |