From 7c845eb5e184977d9c7135ae20d012b59f8cc729 Mon Sep 17 00:00:00 2001 From: Joe Perches Date: Fri, 8 Aug 2014 14:24:46 -0700 Subject: scsi: use pci_zalloc_consistent Remove the now unnecessary memset too. Signed-off-by: Joe Perches Cc: Adam Radford Cc: "James E.J. Bottomley" Cc: Jayamohan Kallickal Cc: Dario Ballabio Cc: Michael Neuffer Cc: "Stephen M. Cameron" Cc: Neela Syam Kolli Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/scsi/mesh.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/scsi/mesh.c') diff --git a/drivers/scsi/mesh.c b/drivers/scsi/mesh.c index 7a6160f172ce..57a95e2c3442 100644 --- a/drivers/scsi/mesh.c +++ b/drivers/scsi/mesh.c @@ -1915,14 +1915,12 @@ static int mesh_probe(struct macio_dev *mdev, const struct of_device_id *match) /* We use the PCI APIs for now until the generic one gets fixed * enough or until we get some macio-specific versions */ - dma_cmd_space = pci_alloc_consistent(macio_get_pci_dev(mdev), - ms->dma_cmd_size, - &dma_cmd_bus); + dma_cmd_space = pci_zalloc_consistent(macio_get_pci_dev(mdev), + ms->dma_cmd_size, &dma_cmd_bus); if (dma_cmd_space == NULL) { printk(KERN_ERR "mesh: can't allocate DMA table\n"); goto out_unmap; } - memset(dma_cmd_space, 0, ms->dma_cmd_size); ms->dma_cmds = (struct dbdma_cmd *) DBDMA_ALIGN(dma_cmd_space); ms->dma_cmd_space = dma_cmd_space; -- cgit v1.2.3