diff options
author | Peter Griffin <peter.griffin@linaro.org> | 2016-06-07 18:38:41 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-06-21 21:35:00 +0530 |
commit | aef94fea97eb77f86159375825a370b45d9f2fec (patch) | |
tree | 275639d62e6c0920e859e3d22786cb92a4098e04 /drivers/dma/edma.c | |
parent | 71f7e6cc55003ca6f616ff4094253d28de5d9254 (diff) | |
download | blackbird-op-linux-aef94fea97eb77f86159375825a370b45d9f2fec.tar.gz blackbird-op-linux-aef94fea97eb77f86159375825a370b45d9f2fec.zip |
dmaengine: Remove site specific OOM error messages on kzalloc
If kzalloc() fails it will issue it's own error message including
a dump_stack(). So remove the site specific error messages.
Signed-off-by: Peter Griffin <peter.griffin@linaro.org>
Acked-by: Jon Hunter <jonathanh@nvidia.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/edma.c')
-rw-r--r-- | drivers/dma/edma.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 8181ed131386..3c84cd8215f7 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -1069,10 +1069,8 @@ static struct dma_async_tx_descriptor *edma_prep_slave_sg( edesc = kzalloc(sizeof(*edesc) + sg_len * sizeof(edesc->pset[0]), GFP_ATOMIC); - if (!edesc) { - dev_err(dev, "%s: Failed to allocate a descriptor\n", __func__); + if (!edesc) return NULL; - } edesc->pset_nr = sg_len; edesc->residue = 0; @@ -1173,10 +1171,8 @@ static struct dma_async_tx_descriptor *edma_prep_dma_memcpy( edesc = kzalloc(sizeof(*edesc) + nslots * sizeof(edesc->pset[0]), GFP_ATOMIC); - if (!edesc) { - dev_dbg(dev, "Failed to allocate a descriptor\n"); + if (!edesc) return NULL; - } edesc->pset_nr = nslots; edesc->residue = edesc->residue_stat = len; @@ -1298,10 +1294,8 @@ static struct dma_async_tx_descriptor *edma_prep_dma_cyclic( edesc = kzalloc(sizeof(*edesc) + nslots * sizeof(edesc->pset[0]), GFP_ATOMIC); - if (!edesc) { - dev_err(dev, "%s: Failed to allocate a descriptor\n", __func__); + if (!edesc) return NULL; - } edesc->cyclic = 1; edesc->pset_nr = nslots; @@ -2207,10 +2201,8 @@ static int edma_probe(struct platform_device *pdev) return ret; ecc = devm_kzalloc(dev, sizeof(*ecc), GFP_KERNEL); - if (!ecc) { - dev_err(dev, "Can't allocate controller\n"); + if (!ecc) return -ENOMEM; - } ecc->dev = dev; ecc->id = pdev->id; |