scsi: use pci_zalloc_consistent
Remove the now unnecessary memset too. Signed-off-by: Joe Perches <joe@perches.com> Cc: Adam Radford <linuxraid@lsi.com> Cc: "James E.J. Bottomley" <JBottomley@parallels.com> Cc: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Cc: Dario Ballabio <ballabio_dario@emc.com> Cc: Michael Neuffer <mike@i-Connect.Net> Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com> Cc: Neela Syam Kolli <megaraidlinux@lsi.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
8ac41b9dc7
commit
7c845eb5e1
@@ -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;
|
||||
|
Reference in New Issue
Block a user