From: Andrew Lunn <andrew@lunn.ch>
To: trix@redhat.com
Cc: vivien.didelot@gmail.com, f.fainelli@gmail.com,
olteanv@gmail.com, davem@davemloft.net, kuba@kernel.org,
nathan@kernel.org, ndesaulniers@google.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev
Subject: Re: [PATCH] net: dsa: return success if there was nothing to do
Date: Sat, 5 Mar 2022 20:11:06 +0100 [thread overview]
Message-ID: <YiO1yrlc2lLOx2KR@lunn.ch> (raw)
In-Reply-To: <20220305171448.692839-1-trix@redhat.com>
On Sat, Mar 05, 2022 at 09:14:48AM -0800, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
>
> Clang static analysis reports this representative issue
> dsa.c:486:2: warning: Undefined or garbage value
> returned to caller
> return err;
> ^~~~~~~~~~
>
> err is only set in the loop. If the loop is empty,
> garbage will be returned. So initialize err to 0
> to handle this noop case.
>
> Signed-off-by: Tom Rix <trix@redhat.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
next prev parent reply other threads:[~2022-03-05 19:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-05 17:14 [PATCH] net: dsa: return success if there was nothing to do trix
2022-03-05 19:11 ` Andrew Lunn [this message]
2022-03-05 20:32 ` Vladimir Oltean
2022-03-07 12:30 ` patchwork-bot+netdevbpf
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=YiO1yrlc2lLOx2KR@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=trix@redhat.com \
--cc=vivien.didelot@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.