[media] rc: unlock on error in store_protocols()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 27 Nov 2012 16:35:30 +0000 (13:35 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 27 Dec 2012 15:59:02 +0000 (13:59 -0200)
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>
drivers/media/rc/rc-main.c

index d593bc65b4ca402ef8d3dbc7be37acd67f32c138..759a40a42eaaf3bdc64e5df6e2323367d7e1bed6 100644 (file)
@@ -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++;