Commit 04ea2389 authored by Dan Carpenter's avatar Dan Carpenter Committed by Ben Hutchings

rc: unlock on error in show_protocols()

commit 30ebc5e4 upstream.

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: default avatarHerton R. Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarDouglas Bagnall <douglas@paradise.net.nz>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 86e9259d
......@@ -777,8 +777,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,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment