netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giuseppe CAVALLARO <peppe.cavallaro@st.com>
To: Tobias Klauser <tklauser@distanz.ch>
Cc: <netdev@vger.kernel.org>
Subject: Re: [PATCH] net: stmmac: Check return value of alloc_dma_desc_resources()
Date: Mon, 24 Feb 2014 16:22:08 +0100	[thread overview]
Message-ID: <530B63A0.902@st.com> (raw)
In-Reply-To: <1393070943-3466-1-git-send-email-tklauser@distanz.ch>

On 2/22/2014 1:09 PM, Tobias Klauser wrote:
> alloc_dma_desc_resources() returns an error value and the next line
> actually checks for it, so assign the return value properly.
>
> Found by the coverity scanner.
>
> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>

Acked-by: Giuseppe Cavallaro <peppe.cavallaro@st.com>

> ---
>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index a2e7d2c..078ad0e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -1705,7 +1705,7 @@ static int stmmac_open(struct net_device *dev)
>   	priv->dma_rx_size = STMMAC_ALIGN(dma_rxsize);
>   	priv->dma_buf_sz = STMMAC_ALIGN(buf_sz);
>
> -	alloc_dma_desc_resources(priv);
> +	ret = alloc_dma_desc_resources(priv);
>   	if (ret < 0) {
>   		pr_err("%s: DMA descriptors allocation failed\n", __func__);
>   		goto dma_desc_error;
>

  reply	other threads:[~2014-02-24 15:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-22 12:09 [PATCH] net: stmmac: Check return value of alloc_dma_desc_resources() Tobias Klauser
2014-02-24 15:22 ` Giuseppe CAVALLARO [this message]
2014-02-24 23:58 ` David Miller

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=530B63A0.902@st.com \
    --to=peppe.cavallaro@st.com \
    --cc=netdev@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    /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;
as well as URLs for NNTP newsgroup(s).