Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5c990ee authored by Thomas Meyer's avatar Thomas Meyer Committed by Martin K. Petersen
Browse files

scsi: lpfc: Use *_pool_zalloc rather than *_pool_alloc



Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.

Signed-off-by: default avatarThomas Meyer <thomas@m3y3r.de>
Acked-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 36631157
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -4116,14 +4116,13 @@ lpfc_new_io_buf(struct lpfc_hba *phba, int num_to_alloc)
		 * pci bus space for an I/O. The DMA buffer includes the
		 * number of SGE's necessary to support the sg_tablesize.
		 */
		lpfc_ncmd->data = dma_pool_alloc(phba->lpfc_sg_dma_buf_pool,
		lpfc_ncmd->data = dma_pool_zalloc(phba->lpfc_sg_dma_buf_pool,
						  GFP_KERNEL,
						  &lpfc_ncmd->dma_handle);
		if (!lpfc_ncmd->data) {
			kfree(lpfc_ncmd);
			break;
		}
		memset(lpfc_ncmd->data, 0, phba->cfg_sg_dma_buf_size);

		/*
		 * 4K Page alignment is CRITICAL to BlockGuard, double check