From: coverity-bot <keescook@chromium.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
"Gustavo A. R. Silva" <gustavo@embeddedor.com>,
linux-next@vger.kernel.org
Subject: Coverity: mv88e6390_serdes_get_regs(): Error handling issues
Date: Mon, 13 Apr 2020 09:20:04 -0700 [thread overview]
Message-ID: <202004130920.8FCC182@keescook> (raw)
Hello!
This is an experimental automated report about issues detected by Coverity
from a scan of next-20200413 as part of the linux-next weekly 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:
Sun Feb 16 18:54:15 2020 +0100
bf3504cea7d7 ("net: dsa: mv88e6xxx: Add 6390 family PCS registers to ethtool -d")
Coverity reported the following:
*** CID 1461660: Error handling issues (CHECKED_RETURN)
/drivers/net/dsa/mv88e6xxx/serdes.c: 958 in mv88e6390_serdes_get_regs()
952
953 lane = mv88e6xxx_serdes_get_lane(chip, port);
954 if (lane == 0)
955 return;
956
957 for (i = 0 ; i < ARRAY_SIZE(mv88e6390_serdes_regs); i++) {
vvv CID 1461660: Error handling issues (CHECKED_RETURN)
vvv Calling "mv88e6390_serdes_read" without checking return value (as is done elsewhere 11 out of 13 times).
958 mv88e6390_serdes_read(chip, lane, MDIO_MMD_PHYXS,
959 mv88e6390_serdes_regs[i], ®);
960 p[i] = reg;
961 }
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: 1461660 ("Error handling issues")
Fixes: bf3504cea7d7 ("net: dsa: mv88e6xxx: Add 6390 family PCS registers to ethtool -d")
Thanks for your attention!
--
Coverity-bot
reply other threads:[~2020-04-13 16:20 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=202004130920.8FCC182@keescook \
--to=keescook@chromium.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=gustavo@embeddedor.com \
--cc=linux-next@vger.kernel.org \
/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).