diff options
author | Panagiotis Issaris <takis@issaris.org> | 2006-01-11 19:40:56 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-11 19:40:56 -0200 |
commit | 7408187d223f63d46a13b6a35b8f96b032c2f623 (patch) | |
tree | 425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/common/saa7146_fops.c | |
parent | 0b3af1b6df82cfdb54ae294ed860263011fa0408 (diff) | |
download | op-kernel-dev-7408187d223f63d46a13b6a35b8f96b032c2f623.zip op-kernel-dev-7408187d223f63d46a13b6a35b8f96b032c2f623.tar.gz |
V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc
Conversions from kmalloc+memset to k(z|c)alloc.
Signed-off-by: Panagiotis Issaris <takis@issaris.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r-- | drivers/media/common/saa7146_fops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c index b614612..f8cf73e 100644 --- a/drivers/media/common/saa7146_fops.c +++ b/drivers/media/common/saa7146_fops.c @@ -239,13 +239,12 @@ static int fops_open(struct inode *inode, struct file *file) } /* allocate per open data */ - fh = kmalloc(sizeof(*fh),GFP_KERNEL); + fh = kzalloc(sizeof(*fh),GFP_KERNEL); if (NULL == fh) { DEB_S(("cannot allocate memory for per open data.\n")); result = -ENOMEM; goto out; } - memset(fh,0,sizeof(*fh)); file->private_data = fh; fh->dev = dev; @@ -464,12 +463,11 @@ static struct video_device device_template = int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) { - struct saa7146_vv *vv = kmalloc (sizeof(struct saa7146_vv),GFP_KERNEL); + struct saa7146_vv *vv = kzalloc (sizeof(struct saa7146_vv),GFP_KERNEL); if( NULL == vv ) { ERR(("out of memory. aborting.\n")); return -1; } - memset(vv, 0x0, sizeof(*vv)); DEB_EE(("dev:%p\n",dev)); |