From 6068f5063850984fe6c2490bc8384a7afa2728dc Mon Sep 17 00:00:00 2001 From: Steven Toth Date: Mon, 6 Oct 2008 22:46:08 -0300 Subject: 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 Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/dvb-core/dvb_frontend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/media/dvb/dvb-core') diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index bd59c9514ab5..f170e822fadc 100644 --- a/drivers/media/dvb/dvb-core/dvb_frontend.c +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c @@ -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 * -- cgit v1.2.3-58-ga151