mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-14 11:56:47 +07:00
[media] rc: unlock on error in show_protocols()
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> Cc: stable@vger.kernel.org Signed-off-by: Douglas Bagnall <douglas@paradise.net.nz> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
45b82596be
commit
30ebc5e44d
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user