mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nick Krause <xerofoiify@gmail.com>
To: Linus Walleij <linus.walleij@linaro.org>,
	Alexandre Courbot <gnurou@gmail.com>,
	linux-gpio@vger.kernel.org (open list:GPIO SUBSYSTEM),
	linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] drivers/gpio: Check return value to silence warning
Date: Thu,  7 Aug 2014 06:40:13 +0200	[thread overview]
Message-ID: <1407386413-20111-1-git-send-email-xerofoiify@gmail.com> (raw)

Check for return value to fix the following error

drivers/gpio/gpio-sch311x.c: In function 'sch311x_gpio_probe':
drivers/gpio/gpio-sch311x.c:286:18: warning: ignoring return value of
'gpiochip_remove', declared with attribute warn_unused_result [-Wunused-result]

in the context we do not need to check but checking makes compiler happy.
With help from kernelnewbies.

Signed-off-by: Nick Krause <xerofoify@gmail.com>
---
 drivers/gpio/gpio-sch311x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-sch311x.c b/drivers/gpio/gpio-sch311x.c
index f942b80..af35e99 100644
--- a/drivers/gpio/gpio-sch311x.c
+++ b/drivers/gpio/gpio-sch311x.c
@@ -283,7 +283,7 @@ exit_err:
 	release_region(pdata->runtime_reg + GP1, 6);
 	/* release already registered chips */
 	for (--i; i >= 0; i--)
-		gpiochip_remove(&priv->blocks[i].chip);
+		WARN_ON(gpiochip_remove(&priv->blocks[i].chip));
 	return err;
 }
 
-- 
2.0.1


             reply	other threads:[~2014-08-07  4:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  4:40 Nick Krause [this message]
2014-08-07  4:45 ` Alexandre Courbot

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=1407386413-20111-1-git-send-email-xerofoiify@gmail.com \
    --to=xerofoiify@gmail.com \
    --cc=gnurou@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®