From: Daeseok Youn Date: Wed, 7 May 2014 06:01:04 +0000 (+0900) Subject: staging: bcm: use kzalloc instead of kmalloc/memset X-Git-Tag: next-20140530~19^2~526 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=87755c0b3af6c8e6307e928184d96b281b3aef1d;p=karo-tx-linux.git staging: bcm: use kzalloc instead of kmalloc/memset Signed-off-by: Daeseok Youn Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/bcm/InterfaceDld.c b/drivers/staging/bcm/InterfaceDld.c index 005e4607b260..e1925bdc127c 100644 --- a/drivers/staging/bcm/InterfaceDld.c +++ b/drivers/staging/bcm/InterfaceDld.c @@ -53,8 +53,8 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, struct bcm_interface_adapter *psIntfAdapter = arg; int bytes; - buff = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA); - buff_readback = kmalloc(MAX_TRANSFER_CTRL_BYTE_USB , GFP_DMA); + buff = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB, GFP_DMA); + buff_readback = kzalloc(MAX_TRANSFER_CTRL_BYTE_USB , GFP_DMA); if (!buff || !buff_readback) { kfree(buff); kfree(buff_readback); @@ -64,8 +64,6 @@ int InterfaceFileReadbackFromChip(PVOID arg, struct file *flp, is_config_file = (on_chip_loc == CONFIG_BEGIN_ADDR) ? 1 : 0; - memset(buff_readback, 0, MAX_TRANSFER_CTRL_BYTE_USB); - memset(buff, 0, MAX_TRANSFER_CTRL_BYTE_USB); while (1) { oldfs = get_fs(); set_fs(get_ds());