From: Daniel Mack Date: Wed, 26 May 2010 21:42:26 +0000 (-0700) Subject: drivers/gpio/it8761e_gpio: check return value of gpiochip_remove() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=48baa18b250d5e36ed9f9bb04cdf812d74da08ca;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git drivers/gpio/it8761e_gpio: check return value of gpiochip_remove() This eliminates the following build warning: drivers/gpio/it8761e_gpio.c: In function `it8761e_gpio_exit': drivers/gpio/it8761e_gpio.c:220: warning: ignoring return value of `gpiochip_remove', declared with attribute warn_unused_result Signed-off-by: Daniel Mack Cc: Denis Turischev Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/gpio/it8761e_gpio.c b/drivers/gpio/it8761e_gpio.c index 41a9388f2fde..48fc43c4bdd1 100644 --- a/drivers/gpio/it8761e_gpio.c +++ b/drivers/gpio/it8761e_gpio.c @@ -217,7 +217,10 @@ gpiochip_add_err: static void __exit it8761e_gpio_exit(void) { if (gpio_ba) { - gpiochip_remove(&it8761e_gpio_chip); + int ret = gpiochip_remove(&it8761e_gpio_chip); + + WARN(ret, "%s(): gpiochip_remove() failed, ret=%d\n", + __func__, ret); release_region(gpio_ba, GPIO_IOSIZE); gpio_ba = 0;