Commit c4fe29a3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Mauro Carvalho Chehab

[media] dvb: unlock on error in dvb_ca_en50221_io_do_ioctl()

We recently pushed the locking down into this function, but there was
an error path where the unlock was missed.
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 9898df64
...@@ -1227,8 +1227,10 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file, ...@@ -1227,8 +1227,10 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file,
case CA_GET_SLOT_INFO: { case CA_GET_SLOT_INFO: {
struct ca_slot_info *info = parg; struct ca_slot_info *info = parg;
if ((info->num > ca->slot_count) || (info->num < 0)) if ((info->num > ca->slot_count) || (info->num < 0)) {
return -EINVAL; err = -EINVAL;
goto out_unlock;
}
info->type = CA_CI_LINK; info->type = CA_CI_LINK;
info->flags = 0; info->flags = 0;
...@@ -1247,6 +1249,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file, ...@@ -1247,6 +1249,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file,
break; break;
} }
out_unlock:
mutex_unlock(&ca->ioctl_mutex); mutex_unlock(&ca->ioctl_mutex);
return err; return err;
} }
......
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