aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/agent.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-11-02 07:23:14 -0800
committerRoland Dreier <rolandd@cisco.com>2005-11-02 07:23:14 -0800
commitde6eb66b56d9df5ce6bd254994f05e065214e8cd (patch)
tree7463446a05b5e9a5d2fc400da0be8d4a6c2ff6f1 /drivers/infiniband/core/agent.c
parent[IB] ucm: 32/64 compatibility fixes (diff)
downloadlinux-dev-de6eb66b56d9df5ce6bd254994f05e065214e8cd.tar.xz
linux-dev-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.c3
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,