diff options
author | Douglas Bagnall <douglas@paradise.net.nz> | 2012-08-07 10:50:51 -0300 |
---|---|---|
committer | John Rigby <john.rigby@linaro.org> | 2012-08-15 23:34:02 -0600 |
commit | fe60e038722c4be49efcf30f94fb47770af5148d (patch) | |
tree | bda8452e10c95dce0d54ddad246a3405b1c6426c | |
parent | d6042a14de5d78e84f649799dea7555b6d121007 (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.c | 5 |
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); |