aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas@paradise.net.nz>2012-08-07 10:50:51 -0300
committerJohn Rigby <john.rigby@linaro.org>2012-08-15 23:46:26 -0600
commit95dcb28bfe9bff9e970a4d0ab2a72546df51e8c6 (patch)
tree1e8a5872ab0b5f296c99b34725e3d0832b287f15
parent69820996d68c8e84b67db9d5a9c3aaf4d666f70c (diff)
UBUNTU: SAUCE: Unlock the rc_dev lock when the raw device is missing
BugLink: http://bugs.launchpad.net/bugs/1015836 As pointed out by Ben Hutchings, after commit 720bb6436, the lock was being taken and not released when an rc_dev has a NULL raw device. Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz> Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
-rw-r--r--drivers/media/rc/rc-main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index cabc19c1051..dcd45d0cdfc 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -778,9 +778,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,
(long long)enabled);