From: Steven Toth Date: Tue, 7 Oct 2008 01:46:08 +0000 (-0300) Subject: V4L/DVB (9183): S2API: Return error of the caller provides 0 commands. X-Git-Tag: v2.6.28-rc1~601^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=6068f5063850984fe6c2490bc8384a7afa2728dc;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c index bd59c9514ab..f170e822fad 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 *