diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-11-02 07:23:14 -0800 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-02 07:23:14 -0800 |
commit | de6eb66b56d9df5ce6bd254994f05e065214e8cd (patch) | |
tree | 7463446a05b5e9a5d2fc400da0be8d4a6c2ff6f1 /drivers/infiniband/core/agent.c | |
parent | 7b28b0d000eeb62d77add636f5d6eb0da04e48aa (diff) | |
download | blackbird-op-linux-de6eb66b56d9df5ce6bd254994f05e065214e8cd.tar.gz blackbird-op-linux-de6eb66b56d9df5ce6bd254994f05e065214e8cd.zip |
[IB] kzalloc() conversions
Replace kmalloc()+memset(,0,) with kzalloc(), for a net savings of 35
source lines and about 500 bytes of text.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/core/agent.c')
-rw-r--r-- | drivers/infiniband/core/agent.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/agent.c b/drivers/infiniband/core/agent.c index 0c3c6952faae..7545775d38ef 100644 --- a/drivers/infiniband/core/agent.c +++ b/drivers/infiniband/core/agent.c @@ -155,13 +155,12 @@ int ib_agent_port_open(struct ib_device *device, int port_num) int ret; /* Create new device info */ - port_priv = kmalloc(sizeof *port_priv, GFP_KERNEL); + port_priv = kzalloc(sizeof *port_priv, GFP_KERNEL); if (!port_priv) { printk(KERN_ERR SPFX "No memory for ib_agent_port_private\n"); ret = -ENOMEM; goto error1; } - memset(port_priv, 0, sizeof *port_priv); /* Obtain send only MAD agent for SMI QP */ port_priv->agent[0] = ib_register_mad_agent(device, port_num, |