linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: andy.shevchenko@gmail.com
To: Sukrut Bellary <sukrut.bellary@linux.com>
Cc: Mark Brown <broonie@kernel.org>,
	linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] spi:pic32: Fix missing error code 'ret' in the failure path
Date: Sat, 13 May 2023 18:14:01 +0300	[thread overview]
Message-ID: <ZF-pOdkzE88--xdm@surfacebook> (raw)
In-Reply-To: <20230513122653.45226-1-sukrut.bellary@linux.com>

Sat, May 13, 2023 at 05:26:53AM -0700, Sukrut Bellary kirjoitti:
> smatch warning -
> drivers/spi/spi-pic32.c:634 pic32_spi_dma_prep() warn: missing error code 'ret'
> 
> Currently in case of pic32_spi_dma_config() failure, SUCCESS is returned.
> Capture and return the error code in the failure path.

The comment above the pic32_spi_dma_config() call on the caller side suggests
that DMA is optional. With that in mind the current code won't prevent us from
using the driver in PIO mode.

> This is based on static analysis only. Compilation tested.

That's why I think it's incorrect fix. You need to fix smatch.

-- 
With Best Regards,
Andy Shevchenko



      reply	other threads:[~2023-05-13 15:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-13 12:26 [PATCH] spi:pic32: Fix missing error code 'ret' in the failure path Sukrut Bellary
2023-05-13 15:14 ` andy.shevchenko [this message]

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=ZF-pOdkzE88--xdm@surfacebook \
    --to=andy.shevchenko@gmail.com \
    --cc=broonie@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-spi@vger.kernel.org \
    --cc=sukrut.bellary@linux.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;
as well as URLs for NNTP newsgroup(s).