diff options
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r-- | drivers/infiniband/core/addr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index a91001c59b6..c5c33d35f87 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c | |||
@@ -295,10 +295,9 @@ int rdma_resolve_ip(struct rdma_addr_client *client, | |||
295 | struct addr_req *req; | 295 | struct addr_req *req; |
296 | int ret = 0; | 296 | int ret = 0; |
297 | 297 | ||
298 | req = kmalloc(sizeof *req, GFP_KERNEL); | 298 | req = kzalloc(sizeof *req, GFP_KERNEL); |
299 | if (!req) | 299 | if (!req) |
300 | return -ENOMEM; | 300 | return -ENOMEM; |
301 | memset(req, 0, sizeof *req); | ||
302 | 301 | ||
303 | if (src_addr) | 302 | if (src_addr) |
304 | memcpy(&req->src_addr, src_addr, ip_addr_size(src_addr)); | 303 | memcpy(&req->src_addr, src_addr, ip_addr_size(src_addr)); |