aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common/saa7146_fops.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:36:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 22:36:32 -0500
commit593195f9b2309693f27b402f34573f7920b82c3e (patch)
tree54d55557665e72e90ef35a1e0f008d381c17ed98 /drivers/media/common/saa7146_fops.c
parent983d5dbdb2b38d024935f560a91cddcf704875f3 (diff)
parentf9cfc08d640e1586e76eee63cc2b0a9360bc7c7e (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Diffstat (limited to 'drivers/media/common/saa7146_fops.c')
-rw-r--r--drivers/media/common/saa7146_fops.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/common/saa7146_fops.c b/drivers/media/common/saa7146_fops.c
index b614612be7b4..f8cf73ed49ad 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)
239 } 239 }
240 240
241 /* allocate per open data */ 241 /* allocate per open data */
242 fh = kmalloc(sizeof(*fh),GFP_KERNEL); 242 fh = kzalloc(sizeof(*fh),GFP_KERNEL);
243 if (NULL == fh) { 243 if (NULL == fh) {
244 DEB_S(("cannot allocate memory for per open data.\n")); 244 DEB_S(("cannot allocate memory for per open data.\n"));
245 result = -ENOMEM; 245 result = -ENOMEM;
246 goto out; 246 goto out;
247 } 247 }
248 memset(fh,0,sizeof(*fh));
249 248
250 file->private_data = fh; 249 file->private_data = fh;
251 fh->dev = dev; 250 fh->dev = dev;
@@ -464,12 +463,11 @@ static struct video_device device_template =
464 463
465int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) 464int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
466{ 465{
467 struct saa7146_vv *vv = kmalloc (sizeof(struct saa7146_vv),GFP_KERNEL); 466 struct saa7146_vv *vv = kzalloc (sizeof(struct saa7146_vv),GFP_KERNEL);
468 if( NULL == vv ) { 467 if( NULL == vv ) {
469 ERR(("out of memory. aborting.\n")); 468 ERR(("out of memory. aborting.\n"));
470 return -1; 469 return -1;
471 } 470 }
472 memset(vv, 0x0, sizeof(*vv));
473 471
474 DEB_EE(("dev:%p\n",dev)); 472 DEB_EE(("dev:%p\n",dev));
475 473