From: Dan Carpenter <dan.carpenter@oracle.com>
To: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: "Douglas Bagnall" <douglas@paradise.net.nz>,
"David Härdeman" <david@hardeman.nu>,
"Jarod Wilson" <jarod@redhat.com>,
"Ezequiel Garcia" <elezegarcia@gmail.com>,
linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 1/2] [media] rc: unlock on error in show_protocols()
Date: Tue, 27 Nov 2012 20:35:09 +0300 [thread overview]
Message-ID: <20121127173509.GE1059@elgon.mountain> (raw)
We recently introduced a new return -ENODEV in this function but we need
to unlock before returning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index 601d1ac1..d593bc6 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -789,8 +789,10 @@ static ssize_t show_protocols(struct device *device,
} else if (dev->raw) {
enabled = dev->raw->enabled_protocols;
allowed = ir_raw_get_allowed_protocols();
- } else
+ } else {
+ mutex_unlock(&dev->lock);
return -ENODEV;
+ }
IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",
(long long)allowed,
next reply other threads:[~2012-11-27 17:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-27 17:35 Dan Carpenter [this message]
2012-11-27 19:51 ` [patch 1/2] [media] rc: unlock on error in show_protocols() Douglas Bagnall
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=20121127173509.GE1059@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=david@hardeman.nu \
--cc=douglas@paradise.net.nz \
--cc=elezegarcia@gmail.com \
--cc=jarod@redhat.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
/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