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

Commit aef94fea authored by Peter Griffin's avatar Peter Griffin Committed by Vinod Koul
Browse files

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: default avatarPeter Griffin <peter.griffin@linaro.org>
Acked-by: default avatarJon Hunter <jonathanh@nvidia.com>
Acked-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 71f7e6cc
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -1443,8 +1443,6 @@ static struct dma_async_tx_descriptor *pl08x_prep_dma_memcpy(
	dsg = kzalloc(sizeof(struct pl08x_sg), GFP_NOWAIT);
	if (!dsg) {
		pl08x_free_txd(pl08x, txd);
		dev_err(&pl08x->adev->dev, "%s no memory for pl080 sg\n",
				__func__);
		return NULL;
	}
	list_add_tail(&dsg->node, &txd->dsg_list);
@@ -1901,11 +1899,8 @@ static int pl08x_dma_init_virtual_channels(struct pl08x_driver_data *pl08x,
	 */
	for (i = 0; i < channels; i++) {
		chan = kzalloc(sizeof(*chan), GFP_KERNEL);
		if (!chan) {
			dev_err(&pl08x->adev->dev,
				"%s no memory for channel\n", __func__);
		if (!chan)
			return -ENOMEM;
		}

		chan->host = pl08x;
		chan->state = PL08X_CHAN_IDLE;
@@ -2360,9 +2355,6 @@ static int pl08x_probe(struct amba_device *adev, const struct amba_id *id)
	pl08x->phy_chans = kzalloc((vd->channels * sizeof(*pl08x->phy_chans)),
			GFP_KERNEL);
	if (!pl08x->phy_chans) {
		dev_err(&adev->dev, "%s failed to allocate "
			"physical channel holders\n",
			__func__);
		ret = -ENOMEM;
		goto out_no_phychans;
	}
+0 −2
Original line number Diff line number Diff line
@@ -397,8 +397,6 @@ static int mpc52xx_bcom_probe(struct platform_device *op)
	/* Get a clean struct */
	bcom_eng = kzalloc(sizeof(struct bcom_engine), GFP_KERNEL);
	if (!bcom_eng) {
		printk(KERN_ERR DRIVER_NAME ": "
			"Can't allocate state structure\n");
		rv = -ENOMEM;
		goto error_sramclean;
	}
+4 −12
Original line number Diff line number Diff line
@@ -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;
+0 −2
Original line number Diff line number Diff line
@@ -1234,7 +1234,6 @@ static int fsl_dma_chan_probe(struct fsldma_device *fdev,
	/* alloc channel */
	chan = kzalloc(sizeof(*chan), GFP_KERNEL);
	if (!chan) {
		dev_err(fdev->dev, "no free memory for DMA channels!\n");
		err = -ENOMEM;
		goto out_return;
	}
@@ -1340,7 +1339,6 @@ static int fsldma_of_probe(struct platform_device *op)

	fdev = kzalloc(sizeof(*fdev), GFP_KERNEL);
	if (!fdev) {
		dev_err(&op->dev, "No enough memory for 'priv'\n");
		err = -ENOMEM;
		goto out_return;
	}
+4 −6
Original line number Diff line number Diff line
@@ -425,10 +425,9 @@ static struct dma_async_tx_descriptor *k3_dma_prep_memcpy(

	num = DIV_ROUND_UP(len, DMA_MAX_SIZE);
	ds = kzalloc(sizeof(*ds) + num * sizeof(ds->desc_hw[0]), GFP_ATOMIC);
	if (!ds) {
		dev_dbg(chan->device->dev, "vchan %p: kzalloc fail\n", &c->vc);
	if (!ds)
		return NULL;
	}

	ds->desc_hw_lli = __virt_to_phys((unsigned long)&ds->desc_hw[0]);
	ds->size = len;
	ds->desc_num = num;
@@ -481,10 +480,9 @@ static struct dma_async_tx_descriptor *k3_dma_prep_slave_sg(
	}

	ds = kzalloc(sizeof(*ds) + num * sizeof(ds->desc_hw[0]), GFP_ATOMIC);
	if (!ds) {
		dev_dbg(chan->device->dev, "vchan %p: kzalloc fail\n", &c->vc);
	if (!ds)
		return NULL;
	}

	ds->desc_hw_lli = __virt_to_phys((unsigned long)&ds->desc_hw[0]);
	ds->desc_num = num;
	num = 0;
Loading