V4L/DVB: dvb-core: remove unnecessary casting of kmalloc
drivers/media/dvb/dvb-core/dvb_frontend.c | 6 ++---- Signed-off-by: Thiago Farina <tfransosi@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
cebedf15d2
commit
6e3924aa8d
|
@ -1536,8 +1536,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
|
||||||
if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
tvp = (struct dtv_property *) kmalloc(tvps->num *
|
tvp = kmalloc(tvps->num * sizeof(struct dtv_property), GFP_KERNEL);
|
||||||
sizeof(struct dtv_property), GFP_KERNEL);
|
|
||||||
if (!tvp) {
|
if (!tvp) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
|
@ -1569,8 +1568,7 @@ static int dvb_frontend_ioctl_properties(struct inode *inode, struct file *file,
|
||||||
if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
if ((tvps->num == 0) || (tvps->num > DTV_IOCTL_MAX_MSGS))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
tvp = (struct dtv_property *) kmalloc(tvps->num *
|
tvp = kmalloc(tvps->num * sizeof(struct dtv_property), GFP_KERNEL);
|
||||||
sizeof(struct dtv_property), GFP_KERNEL);
|
|
||||||
if (!tvp) {
|
if (!tvp) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto out;
|
goto out;
|
||||||
|
|
Loading…
Reference in New Issue