]> Git Repo - linux.git/commitdiff
[media] rc: unlock on error in show_protocols()
authorDan Carpenter <[email protected]>
Tue, 27 Nov 2012 16:35:09 +0000 (13:35 -0300)
committerMauro Carvalho Chehab <[email protected]>
Wed, 26 Dec 2012 14:02:13 +0000 (12:02 -0200)
We recently introduced a new return -ENODEV in this function but we need
to unlock before returning.

[[email protected]: found two patches with the same fix. Merged SOB's/acks into one patch]
Acked-by: Herton R. Krzesinski <[email protected]>
Signed-off-by: Dan Carpenter <[email protected]>
Cc: [email protected]
Signed-off-by: Douglas Bagnall <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
drivers/media/rc/rc-main.c

index 601d1ac1c688b2608e8b96cbecae27f877c4b4b6..d593bc65b4ca402ef8d3dbc7be37acd67f32c138 100644 (file)
@@ -789,8 +789,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,
This page took 0.063896 seconds and 4 git commands to generate.