public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Ravi Kumar V <kumarrav@codeaurora.org>
Cc: Vinod Koul <vinod.koul@intel.com>,
	Dan Williams <dan.j.williams@intel.com>,
	David Brown <davidb@codeaurora.org>,
	Daniel Walker <dwalker@fifo99.com>,
	Bryan Huntsman <bryanh@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	linux-arm-msm@vger.kernel.or,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, tsoni@codeaurora.org
Subject: Re: [PATCH v4 2/2] DMAEngine: Add DMAEngine driver based on old MSM ADM DMA APIs
Date: Thu, 22 Mar 2012 12:49:48 +0100	[thread overview]
Message-ID: <4F6B11DC.9090401@metafoo.de> (raw)
In-Reply-To: <1332413882-8456-1-git-send-email-kumarrav@codeaurora.org>

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.


  reply	other threads:[~2012-03-22 11:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22 10:58 [PATCH v4 2/2] DMAEngine: Add DMAEngine driver based on old MSM ADM DMA APIs Ravi Kumar V
2012-03-22 11:49 ` Lars-Peter Clausen [this message]
2012-03-22 15:11   ` Trilok Soni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6B11DC.9090401@metafoo.de \
    --to=lars@metafoo.de \
    --cc=bryanh@codeaurora.org \
    --cc=dan.j.williams@intel.com \
    --cc=davidb@codeaurora.org \
    --cc=dwalker@fifo99.com \
    --cc=kumarrav@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.or \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=tsoni@codeaurora.org \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox