aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/sata_fsl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c
index 616a6d2ac20c..07bc7e4dbd04 100644
--- a/drivers/ata/sata_fsl.c
+++ b/drivers/ata/sata_fsl.c
@@ -734,13 +734,12 @@ static int sata_fsl_port_start(struct ata_port *ap)
734 if (!pp) 734 if (!pp)
735 return -ENOMEM; 735 return -ENOMEM;
736 736
737 mem = dma_alloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma, 737 mem = dma_zalloc_coherent(dev, SATA_FSL_PORT_PRIV_DMA_SZ, &mem_dma,
738 GFP_KERNEL); 738 GFP_KERNEL);
739 if (!mem) { 739 if (!mem) {
740 kfree(pp); 740 kfree(pp);
741 return -ENOMEM; 741 return -ENOMEM;
742 } 742 }
743 memset(mem, 0, SATA_FSL_PORT_PRIV_DMA_SZ);
744 743
745 pp->cmdslot = mem; 744 pp->cmdslot = mem;
746 pp->cmdslot_paddr = mem_dma; 745 pp->cmdslot_paddr = mem_dma;