aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter2012-11-27 10:35:09 -0600
committerGreg Kroah-Hartman2013-03-03 16:06:41 -0600
commitf74e995c9ba5963cd8d6ef91abe8f49d9614b423 (patch)
tree43a27ede5767982766e7619961652b199d9dc750
parent0f600ee1431404eb87d36b84a66ccc004c5ace9b (diff)
downloadkernel-common-f74e995c9ba5963cd8d6ef91abe8f49d9614b423.tar.gz
kernel-common-f74e995c9ba5963cd8d6ef91abe8f49d9614b423.tar.xz
kernel-common-f74e995c9ba5963cd8d6ef91abe8f49d9614b423.zip
media: rc: unlock on error in show_protocols()
commit 30ebc5e44d057a1619ad63fe32c8c1670c37c4b8 upstream. 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> Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/media/rc/rc-main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index cabc19c1051..cec1f8c05e6 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -778,8 +778,10 @@ static ssize_t show_protocols(struct device *device,
778 } else if (dev->raw) { 778 } else if (dev->raw) {
779 enabled = dev->raw->enabled_protocols; 779 enabled = dev->raw->enabled_protocols;
780 allowed = ir_raw_get_allowed_protocols(); 780 allowed = ir_raw_get_allowed_protocols();
781 } else 781 } else {
782 mutex_unlock(&dev->lock);
782 return -ENODEV; 783 return -ENODEV;
784 }
783 785
784 IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", 786 IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n",
785 (long long)allowed, 787 (long long)allowed,