aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb-init.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 19:36:32 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-11 19:36:32 -0800
commit593195f9b2309693f27b402f34573f7920b82c3e (patch)
tree54d55557665e72e90ef35a1e0f008d381c17ed98 /drivers/media/dvb/dvb-usb/dvb-usb-init.c
parent[PATCH] x86_64: Fix SMP bootup with CONFIG_KDUMP enabled (diff)
parentV4L/DVB (3354): VIDEO_SAA7134_ALSA shouldn't select SND_PCM_OSS (diff)
downloadlinux-dev-593195f9b2309693f27b402f34573f7920b82c3e.tar.xz
linux-dev-593195f9b2309693f27b402f34573f7920b82c3e.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-init.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-init.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index 2e23060cbbca..716f8bf528cd 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -154,12 +154,11 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties
}
info("found a '%s' in warm state.",desc->name);
- d = kmalloc(sizeof(struct dvb_usb_device),GFP_KERNEL);
+ d = kzalloc(sizeof(struct dvb_usb_device),GFP_KERNEL);
if (d == NULL) {
err("no memory for 'struct dvb_usb_device'");
return ret;
}
- memset(d,0,sizeof(struct dvb_usb_device));
d->udev = udev;
memcpy(&d->props,props,sizeof(struct dvb_usb_properties));
@@ -167,13 +166,12 @@ int dvb_usb_device_init(struct usb_interface *intf, struct dvb_usb_properties
d->owner = owner;
if (d->props.size_of_priv > 0) {
- d->priv = kmalloc(d->props.size_of_priv,GFP_KERNEL);
+ d->priv = kzalloc(d->props.size_of_priv,GFP_KERNEL);
if (d->priv == NULL) {
err("no memory for priv in 'struct dvb_usb_device'");
kfree(d);
return -ENOMEM;
}
- memset(d->priv,0,d->props.size_of_priv);
}
usb_set_intfdata(intf, d);