From 7408187d223f63d46a13b6a35b8f96b032c2f623 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 11 Jan 2006 19:40:56 -0200 Subject: 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 Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/saa7134/saa6752hs.c | 3 +-- drivers/media/video/saa7134/saa7134-core.c | 3 +-- drivers/media/video/saa7134/saa7134-video.c | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'drivers/media/video/saa7134') diff --git a/drivers/media/video/saa7134/saa6752hs.c b/drivers/media/video/saa7134/saa6752hs.c index ad73c4a60f2..0e0ba50946e 100644 --- a/drivers/media/video/saa7134/saa6752hs.c +++ b/drivers/media/video/saa7134/saa6752hs.c @@ -511,9 +511,8 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind) struct saa6752hs_state *h; - if (NULL == (h = kmalloc(sizeof(*h), GFP_KERNEL))) + if (NULL == (h = kzalloc(sizeof(*h), GFP_KERNEL))) return -ENOMEM; - memset(h,0,sizeof(*h)); h->client = client_template; h->params = param_defaults; h->client.adapter = adap; diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index accbc32725c..3983a6524ca 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c @@ -803,10 +803,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev, struct saa7134_mpeg_ops *mops; int err; - dev = kmalloc(sizeof(*dev),GFP_KERNEL); + dev = kzalloc(sizeof(*dev),GFP_KERNEL); if (NULL == dev) return -ENOMEM; - memset(dev,0,sizeof(*dev)); /* pci init */ dev->pci = pci_dev; diff --git a/drivers/media/video/saa7134/saa7134-video.c b/drivers/media/video/saa7134/saa7134-video.c index adfa8fe49a1..e97426bc85d 100644 --- a/drivers/media/video/saa7134/saa7134-video.c +++ b/drivers/media/video/saa7134/saa7134-video.c @@ -1264,10 +1264,9 @@ static int video_open(struct inode *inode, struct file *file) v4l2_type_names[type]); /* allocate + initialize per filehandle data */ - fh = kmalloc(sizeof(*fh),GFP_KERNEL); + fh = kzalloc(sizeof(*fh),GFP_KERNEL); if (NULL == fh) return -ENOMEM; - memset(fh,0,sizeof(*fh)); file->private_data = fh; fh->dev = dev; fh->radio = radio; -- cgit v1.2.3