diff options
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_init.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_init.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c index 7896afbb9ce8..304bd8038541 100644 --- a/drivers/infiniband/hw/qib/qib_init.c +++ b/drivers/infiniband/hw/qib/qib_init.c | |||
@@ -270,23 +270,20 @@ static void init_shadow_tids(struct qib_devdata *dd) | |||
270 | struct page **pages; | 270 | struct page **pages; |
271 | dma_addr_t *addrs; | 271 | dma_addr_t *addrs; |
272 | 272 | ||
273 | pages = vmalloc(dd->cfgctxts * dd->rcvtidcnt * sizeof(struct page *)); | 273 | pages = vzalloc(dd->cfgctxts * dd->rcvtidcnt * sizeof(struct page *)); |
274 | if (!pages) { | 274 | if (!pages) { |
275 | qib_dev_err(dd, "failed to allocate shadow page * " | 275 | qib_dev_err(dd, "failed to allocate shadow page * " |
276 | "array, no expected sends!\n"); | 276 | "array, no expected sends!\n"); |
277 | goto bail; | 277 | goto bail; |
278 | } | 278 | } |
279 | 279 | ||
280 | addrs = vmalloc(dd->cfgctxts * dd->rcvtidcnt * sizeof(dma_addr_t)); | 280 | addrs = vzalloc(dd->cfgctxts * dd->rcvtidcnt * sizeof(dma_addr_t)); |
281 | if (!addrs) { | 281 | if (!addrs) { |
282 | qib_dev_err(dd, "failed to allocate shadow dma handle " | 282 | qib_dev_err(dd, "failed to allocate shadow dma handle " |
283 | "array, no expected sends!\n"); | 283 | "array, no expected sends!\n"); |
284 | goto bail_free; | 284 | goto bail_free; |
285 | } | 285 | } |
286 | 286 | ||
287 | memset(pages, 0, dd->cfgctxts * dd->rcvtidcnt * sizeof(struct page *)); | ||
288 | memset(addrs, 0, dd->cfgctxts * dd->rcvtidcnt * sizeof(dma_addr_t)); | ||
289 | |||
290 | dd->pageshadow = pages; | 287 | dd->pageshadow = pages; |
291 | dd->physshadow = addrs; | 288 | dd->physshadow = addrs; |
292 | return; | 289 | return; |