diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-11-27 11:35:09 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-12-26 09:02:13 -0500 |
commit | 30ebc5e44d057a1619ad63fe32c8c1670c37c4b8 (patch) | |
tree | 58ab125c0e542243451eb0ed9e64658df7ef5dd0 | |
parent | 45b82596be0214f161c8176bd3e18f779e36eccd (diff) |
[media] rc: unlock on error in show_protocols()
We recently introduced a new return -ENODEV in this function but we need
to unlock before returning.
[mchehab@redhat.com: found two patches with the same fix. Merged SOB's/acks into one patch]
Acked-by: Herton R. Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: stable@vger.kernel.org
Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r-- | drivers/media/rc/rc-main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index 601d1ac1c688..d593bc65b4ca 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, | |||
789 | } else if (dev->raw) { | 789 | } else if (dev->raw) { |
790 | enabled = dev->raw->enabled_protocols; | 790 | enabled = dev->raw->enabled_protocols; |
791 | allowed = ir_raw_get_allowed_protocols(); | 791 | allowed = ir_raw_get_allowed_protocols(); |
792 | } else | 792 | } else { |
793 | mutex_unlock(&dev->lock); | ||
793 | return -ENODEV; | 794 | return -ENODEV; |
795 | } | ||
794 | 796 | ||
795 | IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", | 797 | IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", |
796 | (long long)allowed, | 798 | (long long)allowed, |