aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_pd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_pd.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_pd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_pd.c b/drivers/infiniband/hw/ehca/ehca_pd.c
index d5345e5b3cd6..79d0591a8043 100644
--- a/drivers/infiniband/hw/ehca/ehca_pd.c
+++ b/drivers/infiniband/hw/ehca/ehca_pd.c
@@ -50,14 +50,13 @@ struct ib_pd *ehca_alloc_pd(struct ib_device *device,
50{ 50{
51 struct ehca_pd *pd; 51 struct ehca_pd *pd;
52 52
53 pd = kmem_cache_alloc(pd_cache, GFP_KERNEL); 53 pd = kmem_cache_zalloc(pd_cache, GFP_KERNEL);
54 if (!pd) { 54 if (!pd) {
55 ehca_err(device, "device=%p context=%p out of memory", 55 ehca_err(device, "device=%p context=%p out of memory",
56 device, context); 56 device, context);
57 return ERR_PTR(-ENOMEM); 57 return ERR_PTR(-ENOMEM);
58 } 58 }
59 59
60 memset(pd, 0, sizeof(struct ehca_pd));
61 pd->ownpid = current->tgid; 60 pd->ownpid = current->tgid;
62 61
63 /* 62 /*