Skip to content

Commit

Permalink
[media] rc: unlock on error in show_protocols()
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Dan Carpenter authored and Mauro Carvalho Chehab committed Dec 26, 2012
1 parent 45b8259 commit 30ebc5e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/rc/rc-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 30ebc5e

Please sign in to comment.