lkml.org 
[lkml]   [2012]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 2/2] DMAEngine: Add DMAEngine driver based on old MSM ADM DMA APIs
On 03/22/2012 11:58 AM, Ravi Kumar V wrote:
> [...]
> +static struct dma_async_tx_descriptor *msm_dma_prep_sg(
> + struct dma_chan *dchan,
> + struct scatterlist *dst_sg, unsigned int dst_nents,
> + struct scatterlist *src_sg, unsigned int src_nents,
> + unsigned long flags, void *context)
> +{
> [...]
> +
> + if (!dchan)
> + return ERR_PTR(-EINVAL);
> +
> + if (dst_nents == 0 || src_nents == 0)
> + return ERR_PTR(-EINVAL);
> + if (!dst_sg || !src_sg)
> + return ERR_PTR(-EINVAL);
> +
> + if ((dst_nents != src_nents) || (cmd_config->num_cmd != src_nents))
> + return ERR_PTR(-EINVAL);
> +
> + [...]
> +
> + if (!new) {
> + dev_err(chan->dev,
> + "No free memory for link descriptor\n");
> + return ERR_PTR(-ENOMEM);
> + }
> +
> [...]
> + return &new->async_tx;
> +}

Same comment as before. This is supposed to return either a valid descriptor
or NULL, but not an ERR_PTR.



\
 
 \ /
  Last update: 2012-03-22 12:51    [W:0.050 / U:0.200 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site