linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Denis Turischev <denis@compulab.co.il>
To: linux-kernel@vger.kernel.org
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Samuel Ortiz <sameo@linux.intel.com>,
	linux-next@vger.kernel.org, Mike Rapoport <mike@compulab.co.il>
Subject: sch_gpio: fix compilation warning "ignoring return value of gpiochip_remove"
Date: Wed, 03 Mar 2010 11:33:29 +0200	[thread overview]
Message-ID: <4B8E2CE9.3050001@compulab.co.il> (raw)
In-Reply-To: <20100303162252.e7cf0e43.sfr@canb.auug.org.au>

Signed-off-by: Denis Turischev <denis@compulab.co.il>
---
 drivers/gpio/sch_gpio.c |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/drivers/gpio/sch_gpio.c b/drivers/gpio/sch_gpio.c
index 761071a..a89c02d 100644
--- a/drivers/gpio/sch_gpio.c
+++ b/drivers/gpio/sch_gpio.c
@@ -229,7 +229,12 @@ 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);
+		return err;
+	}

 err_sch_gpio_core:
 	release_region(res->start, resource_size(res));
@@ -240,11 +245,23 @@ err_sch_gpio_core:

 static int __devexit sch_gpio_remove(struct platform_device *pdev)
 {
+	int err_c, err_r;
 	struct resource *res;
 	if (gpio_ba) {
-		gpiochip_remove(&sch_gpio_core);
-		gpiochip_remove(&sch_gpio_resume);
-
+		err_c = gpiochip_remove(&sch_gpio_core);
+		
+		err_r = gpiochip_remove(&sch_gpio_resume);
+
+		if (err_c) {
+			dev_err(&pdev->dev, "%s failed, %d\n",
+					"gpiochip_remove()", err_c);
+			return err_c;
+		}
+		if (err_r) {
+			dev_err(&pdev->dev, "%s failed, %d\n",
+					"gpiochip_remove()", err_r);
+			return err_r;
+		}
 		res = platform_get_resource(pdev, IORESOURCE_IO, 0);

 		release_region(res->start, resource_size(res));
-- 
1.6.3.3

  reply	other threads:[~2010-03-03  9:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-03  5:22 linux-next: build warning after merge of the mfd tree Stephen Rothwell
2010-03-03  9:33 ` Denis Turischev [this message]
2010-03-05 18:11   ` sch_gpio: fix compilation warning "ignoring return value of gpiochip_remove" Samuel Ortiz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B8E2CE9.3050001@compulab.co.il \
    --to=denis@compulab.co.il \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mike@compulab.co.il \
    --cc=sameo@linux.intel.com \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).