mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 11:55:07 +07:00
V4L/DVB (9183): S2API: Return error of the caller provides 0 commands.
S2API: Return error of the caller provides 0 commands. Signed-off-by: Steven Toth <stoth@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
ef526f4246
commit
6068f50638
@ -1344,7 +1344,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
|
||||
|
||||
/* Put an arbitrary limit on the number of messages that can
|
||||
* be sent at once */
|
||||
if (tvps->num > DTV_IOCTL_MAX_MSGS)
|
||||
if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||
return -EINVAL;
|
||||
|
||||
tvp = (struct dtv_property *) kmalloc(tvps->num *
|
||||
@ -1379,7 +1379,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
|
||||
|
||||
/* Put an arbitrary limit on the number of messages that can
|
||||
* be sent at once */
|
||||
if (tvps->num > DTV_IOCTL_MAX_MSGS)
|
||||
if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||
return -EINVAL;
|
||||
|
||||
tvp = (struct dtv_property *) kmalloc(tvps->num *
|
||||
|
Loading…
Reference in New Issue
Block a user