From: coverity-bot <keescook@chromium.org>
To: Oleksij Rempel <linux@rempel-privat.de>
Cc: "David S. Miller" <davem@davemloft.net>,
Oleksij Rempel <o.rempel@pengutronix.de>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Coverity: ax88772_init_phy(): Control flow issues
Date: Tue, 8 Jun 2021 10:48:07 -0700 [thread overview]
Message-ID: <202106081048.8F67037@keescook> (raw)
Hello!
This is an experimental semi-automated report about issues detected by
Coverity from a scan of next-20210608 as part of the linux-next scan project:
https://scan.coverity.com/projects/linux-next-weekly-scan
You're getting this email because you were associated with the identified
lines of code (noted below) that were touched by commits:
Mon Jun 7 13:23:02 2021 -0700
e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Coverity reported the following:
*** CID 1505172: Control flow issues (NO_EFFECT)
/drivers/net/usb/asix_devices.c: 708 in ax88772_init_phy()
702 static int ax88772_init_phy(struct usbnet *dev)
703 {
704 struct asix_common_private *priv = dev->driver_priv;
705 int ret;
706
707 priv->phy_addr = asix_read_phy_addr(dev, true);
vvv CID 1505172: Control flow issues (NO_EFFECT)
vvv This less-than-zero comparison of an unsigned value is never true. "priv->phy_addr < 0".
708 if (priv->phy_addr < 0)
709 return priv->phy_addr;
710
711 snprintf(priv->phy_name, sizeof(priv->phy_name), PHY_ID_FMT,
712 priv->mdio->id, priv->phy_addr);
713
If this is a false positive, please let us know so we can mark it as
such, or teach the Coverity rules to be smarter. If not, please make
sure fixes get into linux-next. :) For patches fixing this, please
include these lines (but double-check the "Fixes" first):
Reported-by: coverity-bot <keescook+coverity-bot@chromium.org>
Addresses-Coverity-ID: 1505172 ("Control flow issues")
Fixes: e532a096be0e ("net: usb: asix: ax88772: add phylib support")
Thanks for your attention!
--
Coverity-bot
reply other threads:[~2021-06-08 17:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202106081048.8F67037@keescook \
--to=keescook@chromium.org \
--cc=davem@davemloft.net \
--cc=gustavo@embeddedor.com \
--cc=linux-next@vger.kernel.org \
--cc=linux@rempel-privat.de \
--cc=o.rempel@pengutronix.de \
/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