diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2010-03-05 11:14:01 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2010-03-07 16:17:37 -0500 |
commit | 8e7aafe41be2a7cd5c181ed68876e9ec55ccdba7 (patch) | |
tree | 16ca6cc537102f31ca1e99ec8e609d742dc7226d /drivers | |
parent | be9b06b2d80fe661491138c6993f944babb26260 (diff) |
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')
-rw-r--r-- | drivers/gpio/sch_gpio.c | 19 |
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) | |||
229 | return 0; | 229 | return 0; |
230 | 230 | ||
231 | err_sch_gpio_resume: | 231 | err_sch_gpio_resume: |
232 | gpiochip_remove(&sch_gpio_core); | 232 | err = gpiochip_remove(&sch_gpio_core); |
233 | if (err) | ||
234 | dev_err(&pdev->dev, "%s failed, %d\n", | ||
235 | "gpiochip_remove()", err); | ||
233 | 236 | ||
234 | err_sch_gpio_core: | 237 | err_sch_gpio_core: |
235 | release_region(res->start, resource_size(res)); | 238 | release_region(res->start, resource_size(res)); |
@@ -242,13 +245,23 @@ static int __devexit sch_gpio_remove(struct platform_device *pdev) | |||
242 | { | 245 | { |
243 | struct resource *res; | 246 | struct resource *res; |
244 | if (gpio_ba) { | 247 | if (gpio_ba) { |
245 | gpiochip_remove(&sch_gpio_core); | 248 | int err; |
246 | gpiochip_remove(&sch_gpio_resume); | 249 | |
250 | err = gpiochip_remove(&sch_gpio_core); | ||
251 | if (err) | ||
252 | dev_err(&pdev->dev, "%s failed, %d\n", | ||
253 | "gpiochip_remove()", err); | ||
254 | err = gpiochip_remove(&sch_gpio_resume); | ||
255 | if (err) | ||
256 | dev_err(&pdev->dev, "%s failed, %d\n", | ||
257 | "gpiochip_remove()", err); | ||
247 | 258 | ||
248 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); | 259 | res = platform_get_resource(pdev, IORESOURCE_IO, 0); |
249 | 260 | ||
250 | release_region(res->start, resource_size(res)); | 261 | release_region(res->start, resource_size(res)); |
251 | gpio_ba = 0; | 262 | gpio_ba = 0; |
263 | |||
264 | return err; | ||
252 | } | 265 | } |
253 | 266 | ||
254 | return 0; | 267 | return 0; |