summaryrefslogtreecommitdiff
path: root/drivers/staging/ft1000
diff options
context:
space:
mode:
authorDevendra Naga <devendra.aaru@gmail.com>2012-06-19 21:52:38 +0530
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-20 16:07:07 -0700
commit42ad4a8da587792df050748cadfb433cd67a1cad (patch)
treef1600809aa18da3da53ec2cdcb642fcf4fa86278 /drivers/staging/ft1000
parentb10c0b92caf97e0d7f1d76996f73bf07a719aa3e (diff)
staging/ft1000: use kzalloc to allocate the ft1000_device structure
with kzalloc the allocate memory is set to zero, so no need of calling memset again on the allocated memory Signed-off-by: Devendra Naga <devendra.aaru@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ft1000')
-rw-r--r--drivers/staging/ft1000/ft1000-usb/ft1000_usb.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
index a07c504eb029..bfead67436fe 100644
--- a/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
+++ b/drivers/staging/ft1000/ft1000-usb/ft1000_usb.c
@@ -67,15 +67,13 @@ static int ft1000_probe(struct usb_interface *interface,
struct ft1000_info *pft1000info = NULL;
const struct firmware *dsp_fw;
- ft1000dev = kmalloc(sizeof(struct ft1000_device), GFP_KERNEL);
+ ft1000dev = kzalloc(sizeof(struct ft1000_device), GFP_KERNEL);
if (!ft1000dev) {
printk(KERN_ERR "out of memory allocating device structure\n");
return -ENOMEM;
}
- memset(ft1000dev, 0, sizeof(*ft1000dev));
-
dev = interface_to_usbdev(interface);
DEBUG("ft1000_probe: usb device descriptor info:\n");
DEBUG("ft1000_probe: number of configuration is %d\n",