linux-fpga.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Moritz Fischer <moritz.fischer.private@gmail.com>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: Tom Rix <trix@redhat.com>,
	linux-fpga@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fpga: machxo2-spi: Fix missing error code in machxo2_write_complete()
Date: Tue, 17 Aug 2021 19:47:08 -0700	[thread overview]
Message-ID: <CAJYdmeN5WHYx+mczUfkYbeWpRNwevDR5njxttW+4PuBw2Muf6w@mail.gmail.com> (raw)
In-Reply-To: <1628836842-82107-1-git-send-email-jiapeng.chong@linux.alibaba.com>

On Thu, Aug 12, 2021 at 11:41 PM Jiapeng Chong
<jiapeng.chong@linux.alibaba.com> wrote:
>
> The error code is missing in this code scenario, add the error code
> '-EINVAL' to the return value 'ret'.
>
> Eliminate the follow smatch warning:
>
> drivers/fpga/machxo2-spi.c:341 machxo2_write_complete() warn: missing
> error code 'ret'.
>
> Reported-by: Abaci Robot <abaci@linux.alibaba.com>
> Fixes: 88fb3a002330 ("fpga: lattice machxo2: Add Lattice MachXO2
> support")
This shouldn't line-break.
> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
> ---
>  drivers/fpga/machxo2-spi.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/fpga/machxo2-spi.c b/drivers/fpga/machxo2-spi.c
> index b4a530a..ea2ec3c 100644
> --- a/drivers/fpga/machxo2-spi.c
> +++ b/drivers/fpga/machxo2-spi.c
> @@ -338,6 +338,7 @@ static int machxo2_write_complete(struct fpga_manager *mgr,
>                         break;
>                 if (++refreshloop == MACHXO2_MAX_REFRESH_LOOP) {
>                         machxo2_cleanup(mgr);
> +                       ret = -EINVAL;
>                         goto fail;
>                 }
>         } while (1);
> --
> 1.8.3.1
>

Applied to 'fixes' with modifications to commit message,

Moritz

      reply	other threads:[~2021-08-18  2:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-13  6:40 [PATCH] fpga: machxo2-spi: Fix missing error code in machxo2_write_complete() Jiapeng Chong
2021-08-18  2:47 ` Moritz Fischer [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=CAJYdmeN5WHYx+mczUfkYbeWpRNwevDR5njxttW+4PuBw2Muf6w@mail.gmail.com \
    --to=moritz.fischer.private@gmail.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=linux-fpga@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trix@redhat.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).