diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2013-01-04 12:56:02 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-01-06 07:44:45 -0500 |
commit | c4fe29a32ffa16c1166edacad1edc2dcf0aaa08c (patch) | |
tree | 0713c642900ffdb73bdc31be3f99828be4f95705 /drivers/media/dvb-core | |
parent | 9898df6482f71fa0d27b029789ef2f37988c06b3 (diff) |
[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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-core')
-rw-r--r-- | drivers/media/dvb-core/dvb_ca_en50221.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/dvb-core/dvb_ca_en50221.c b/drivers/media/dvb-core/dvb_ca_en50221.c index 190e5e0f48c7..0aac3096728e 100644 --- a/drivers/media/dvb-core/dvb_ca_en50221.c +++ b/drivers/media/dvb-core/dvb_ca_en50221.c | |||
@@ -1227,8 +1227,10 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file, | |||
1227 | case CA_GET_SLOT_INFO: { | 1227 | case CA_GET_SLOT_INFO: { |
1228 | struct ca_slot_info *info = parg; | 1228 | struct ca_slot_info *info = parg; |
1229 | 1229 | ||
1230 | if ((info->num > ca->slot_count) || (info->num < 0)) | 1230 | if ((info->num > ca->slot_count) || (info->num < 0)) { |
1231 | return -EINVAL; | 1231 | err = -EINVAL; |
1232 | goto out_unlock; | ||
1233 | } | ||
1232 | 1234 | ||
1233 | info->type = CA_CI_LINK; | 1235 | info->type = CA_CI_LINK; |
1234 | info->flags = 0; | 1236 | info->flags = 0; |
@@ -1247,6 +1249,7 @@ static int dvb_ca_en50221_io_do_ioctl(struct file *file, | |||
1247 | break; | 1249 | break; |
1248 | } | 1250 | } |
1249 | 1251 | ||
1252 | out_unlock: | ||
1250 | mutex_unlock(&ca->ioctl_mutex); | 1253 | mutex_unlock(&ca->ioctl_mutex); |
1251 | return err; | 1254 | return err; |
1252 | } | 1255 | } |