diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-08-26 11:06:33 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-04 14:09:02 -0700 |
commit | b7553423cde0cb49a35fabcb15f83688c01ce400 (patch) | |
tree | 6e951fdd777bdefd87ed19c7685eff1a1e928bd1 /drivers/staging/rtl8192u | |
parent | 3cd84fbd667d1dd01209b8c30a3a8525e8a99e63 (diff) | |
download | talos-op-linux-b7553423cde0cb49a35fabcb15f83688c01ce400.tar.gz talos-op-linux-b7553423cde0cb49a35fabcb15f83688c01ce400.zip |
staging: rtl8192u: use kzalloc to allocate firmware pointer
the firmware pointer is allocated with kmalloc and memset,
instead we can just do a kzalloc which will return a memory that
has been memset.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8192u')
-rw-r--r-- | drivers/staging/rtl8192u/r8192U_core.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/rtl8192u/r8192U_core.c b/drivers/staging/rtl8192u/r8192U_core.c index 5981d6658320..5c132ac7647d 100644 --- a/drivers/staging/rtl8192u/r8192U_core.c +++ b/drivers/staging/rtl8192u/r8192U_core.c @@ -2808,9 +2808,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev) (priv->EarlyRxThreshold == 7 ? RCR_ONLYERLPKT:0); priv->AcmControl = 0; - priv->pFirmware = kmalloc(sizeof(rt_firmware), GFP_KERNEL); - if (priv->pFirmware) - memset(priv->pFirmware, 0, sizeof(rt_firmware)); + priv->pFirmware = kzalloc(sizeof(rt_firmware), GFP_KERNEL); /* rx related queue */ skb_queue_head_init(&priv->rx_queue); |