提交 a4318038 编写于 作者: A Andy Shevchenko 提交者: Bartosz Golaszewski

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: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Reviewed-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: NBartosz Golaszewski <bartosz.golaszewski@linaro.org>
上级 77289b2f
...@@ -961,9 +961,6 @@ void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc) ...@@ -961,9 +961,6 @@ void of_mm_gpiochip_remove(struct of_mm_gpio_chip *mm_gc)
{ {
struct gpio_chip *gc = &mm_gc->gc; struct gpio_chip *gc = &mm_gc->gc;
if (!mm_gc)
return;
gpiochip_remove(gc); gpiochip_remove(gc);
iounmap(mm_gc->regs); iounmap(mm_gc->regs);
kfree(gc->label); kfree(gc->label);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册