diff options
author | Devendra Naga <devendra.aaru@gmail.com> | 2012-07-12 11:58:37 +0545 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-16 18:53:47 -0700 |
commit | c2a1793d1b2dedd3dfc33af00c6b1d4f050c040c (patch) | |
tree | 0de97520f7fca8f72a54021ae092178c59cd27bd /drivers/staging/gdm72xx | |
parent | 8df858ea76b76dde9a39d4edd9aaded983582cfe (diff) | |
download | blackbird-op-linux-c2a1793d1b2dedd3dfc33af00c6b1d4f050c040c.tar.gz blackbird-op-linux-c2a1793d1b2dedd3dfc33af00c6b1d4f050c040c.zip |
staging/gdm72xx: use kzalloc for phydev and sdev
in sdio probe function we are doing kmalloc which can be done using kzalloc.
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm72xx')
-rw-r--r-- | drivers/staging/gdm72xx/gdm_sdio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/gdm72xx/gdm_sdio.c b/drivers/staging/gdm72xx/gdm_sdio.c index 5e19b09e3bff..3e43c012ef27 100644 --- a/drivers/staging/gdm72xx/gdm_sdio.c +++ b/drivers/staging/gdm72xx/gdm_sdio.c @@ -664,20 +664,17 @@ static int sdio_wimax_probe(struct sdio_func *func, if (ret) return ret; - phy_dev = kmalloc(sizeof(*phy_dev), GFP_KERNEL); + phy_dev = kzalloc(sizeof(*phy_dev), GFP_KERNEL); if (phy_dev == NULL) { ret = -ENOMEM; goto out; } - sdev = kmalloc(sizeof(*sdev), GFP_KERNEL); + sdev = kzalloc(sizeof(*sdev), GFP_KERNEL); if (sdev == NULL) { ret = -ENOMEM; goto out; } - memset(phy_dev, 0, sizeof(*phy_dev)); - memset(sdev, 0, sizeof(*sdev)); - phy_dev->priv_dev = (void *)sdev; phy_dev->send_func = gdm_sdio_send; phy_dev->rcv_func = gdm_sdio_receive; |