summaryrefslogtreecommitdiff
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-11-27 20:35:30 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-27 19:59:02 +0400
commitafe5624b142279c6072ce1872811e309ad7e94be (patch)
treefdf169b07b3168a36752492ee55fce0f46c47ed2 /drivers/media/rc
parenta44dca1717ce2c2381339e21c07d1731a63a7888 (diff)
downloadlinux-afe5624b142279c6072ce1872811e309ad7e94be.tar.xz
[media] rc: unlock on error in store_protocols()
This error path is missing the unlock. [mchehab@redhat.com: Merged two equal patches into one] Signed-off-by: Sasha Levin <sasha.levin@oracle.com> Acked-by: David Härdeman <david@hardeman.nu> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r--drivers/media/rc/rc-main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c
index d593bc65b4ca..759a40a42eaa 100644
--- a/drivers/media/rc/rc-main.c
+++ b/drivers/media/rc/rc-main.c
@@ -892,7 +892,8 @@ static ssize_t store_protocols(struct device *device,
if (i == ARRAY_SIZE(proto_names)) {
IR_dprintk(1, "Unknown protocol: '%s'\n", tmp);
- return -EINVAL;
+ ret = -EINVAL;
+ goto out;
}
count++;