aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
diff options
context:
space:
mode:
authorRoland Dreier <rolandd@cisco.com>2005-11-02 10:23:14 -0500
committerRoland Dreier <rolandd@cisco.com>2005-11-02 10:23:14 -0500
commitde6eb66b56d9df5ce6bd254994f05e065214e8cd (patch)
tree7463446a05b5e9a5d2fc400da0be8d4a6c2ff6f1 /drivers/infiniband/ulp/ipoib/ipoib_multicast.c
parent7b28b0d000eeb62d77add636f5d6eb0da04e48aa (diff)
[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/ulp/ipoib/ipoib_multicast.c')
-rw-r--r--drivers/infiniband/ulp/ipoib/ipoib_multicast.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
index 36ce29836bf2..022eec730751 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_multicast.c
@@ -135,12 +135,10 @@ static struct ipoib_mcast *ipoib_mcast_alloc(struct net_device *dev,
135{ 135{
136 struct ipoib_mcast *mcast; 136 struct ipoib_mcast *mcast;
137 137
138 mcast = kmalloc(sizeof (*mcast), can_sleep ? GFP_KERNEL : GFP_ATOMIC); 138 mcast = kzalloc(sizeof *mcast, can_sleep ? GFP_KERNEL : GFP_ATOMIC);
139 if (!mcast) 139 if (!mcast)
140 return NULL; 140 return NULL;
141 141
142 memset(mcast, 0, sizeof (*mcast));
143
144 init_completion(&mcast->done); 142 init_completion(&mcast->done);
145 143
146 mcast->dev = dev; 144 mcast->dev = dev;