From: Dan Carpenter <dan.carpenter@oracle.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org, kbuild@01.org,
Fengguang Wu <fengguang.wu@intel.com>
Subject: [patch] gpiolib: unlock on error in gpiod_set_debounce()
Date: Tue, 3 Sep 2013 15:15:00 +0300 [thread overview]
Message-ID: <20130903121500.GA16312@elgon.mountain> (raw)
In-Reply-To: <5225c32f.kWadywtP9mkLJ38j%fengguang.wu@intel.com>
There is a missing unlock on error here.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 0eb9cba..3c01782 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -1783,7 +1783,8 @@ static int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce)
if (!chip->set || !chip->set_debounce) {
pr_warn("%s: missing set() or set_debounce() operations\n",
__func__);
- return -EIO;
+ status = -EIO;
+ goto fail;
}
status = gpio_ensure_requested(desc);
next parent reply other threads:[~2013-09-03 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <5225c32f.kWadywtP9mkLJ38j%fengguang.wu@intel.com>
2013-09-03 12:15 ` Dan Carpenter [this message]
2013-09-04 5:51 ` [patch] gpiolib: unlock on error in gpiod_set_debounce() Linus Walleij
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=20130903121500.GA16312@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=fengguang.wu@intel.com \
--cc=kbuild@01.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@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;
as well as URLs for NNTP newsgroup(s).