summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/sch_gpio.c
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-03-05 17:14:01 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2010-03-07 22:17:37 +0100
commit8e7aafe41be2a7cd5c181ed68876e9ec55ccdba7 (patch)
tree16ca6cc537102f31ca1e99ec8e609d742dc7226d /drivers/gpio/sch_gpio.c
parentbe9b06b2d80fe661491138c6993f944babb26260 (diff)
downloadlinux-8e7aafe41be2a7cd5c181ed68876e9ec55ccdba7.tar.gz
linux-8e7aafe41be2a7cd5c181ed68876e9ec55ccdba7.tar.bz2
linux-8e7aafe41be2a7cd5c181ed68876e9ec55ccdba7.zip
gpio: Fix sch_gpio warning
We need to check for gpiochip_remove() errors. Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/gpio/sch_gpio.c')
-rw-r--r--drivers/gpio/sch_gpio.c19
1 files changed, 16 insertions, 3 deletions
diff --git a/drivers/gpio/sch_gpio.c b/drivers/gpio/sch_gpio.c
index 761071ae3596..583521352c16 100644
--- a/drivers/gpio/sch_gpio.c
+++ b/drivers/gpio/sch_gpio.c
@@ -229,7 +229,10 @@ static int __devinit sch_gpio_probe(struct platform_device *pdev)
return 0;
err_sch_gpio_resume:
- gpiochip_remove(&sch_gpio_core);
+ err = gpiochip_remove(&sch_gpio_core);
+ if (err)
+ dev_err(&pdev->dev, "%s failed, %d\n",
+ "gpiochip_remove()", err);
err_sch_gpio_core:
release_region(res->start, resource_size(res));
@@ -242,13 +245,23 @@ static int __devexit sch_gpio_remove(struct platform_device *pdev)
{
struct resource *res;
if (gpio_ba) {
- gpiochip_remove(&sch_gpio_core);
- gpiochip_remove(&sch_gpio_resume);
+ int err;
+
+ err = gpiochip_remove(&sch_gpio_core);
+ if (err)
+ dev_err(&pdev->dev, "%s failed, %d\n",
+ "gpiochip_remove()", err);
+ err = gpiochip_remove(&sch_gpio_resume);
+ if (err)
+ dev_err(&pdev->dev, "%s failed, %d\n",
+ "gpiochip_remove()", err);
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
release_region(res->start, resource_size(res));
gpio_ba = 0;
+
+ return err;
}
return 0;