aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ieee1394/dv1394.c
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2005-11-07 06:31:45 -0500
committerJody McIntyre <scjody@modernduck.com>2005-11-07 06:31:45 -0500
commit8551158abc8ef45a7f473a87e69624d05ebfd684 (patch)
tree47cd79c5f5444c7cac812d797764f203207345a7 /drivers/ieee1394/dv1394.c
parent7afa1467761f06bd9649efd66a4a6b3ff9f29a1f (diff)
kmalloc/kzalloc changes:
dv1394, eth1394, ieee1394, ohci1394, pcilynx, raw1394, sbp2c, video1394: - use kzalloc - provide safer size arguments to kmalloc and kzalloc - omit some casts Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Jody McIntyre <scjody@modernduck.com>
Diffstat (limited to 'drivers/ieee1394/dv1394.c')
-rw-r--r--drivers/ieee1394/dv1394.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ieee1394/dv1394.c b/drivers/ieee1394/dv1394.c
index cbbbe14b8849..d204ec772c0a 100644
--- a/drivers/ieee1394/dv1394.c
+++ b/drivers/ieee1394/dv1394.c
@@ -2218,14 +2218,12 @@ static int dv1394_init(struct ti_ohci *ohci, enum pal_or_ntsc format, enum modes
2218 unsigned long flags; 2218 unsigned long flags;
2219 int i; 2219 int i;
2220 2220
2221 video = kmalloc(sizeof(struct video_card), GFP_KERNEL); 2221 video = kzalloc(sizeof(*video), GFP_KERNEL);
2222 if (!video) { 2222 if (!video) {
2223 printk(KERN_ERR "dv1394: cannot allocate video_card\n"); 2223 printk(KERN_ERR "dv1394: cannot allocate video_card\n");
2224 goto err; 2224 goto err;
2225 } 2225 }
2226 2226
2227 memset(video, 0, sizeof(struct video_card));
2228
2229 video->ohci = ohci; 2227 video->ohci = ohci;
2230 /* lower 2 bits of id indicate which of four "plugs" 2228 /* lower 2 bits of id indicate which of four "plugs"
2231 per host */ 2229 per host */