From: "Krzysztof Wilczyński" <kw@linux.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Jingoo Han <jingoohan1@gmail.com>,
Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
Rob Herring <robh@kernel.org>, Fabio Estevam <festevam@gmail.com>,
linux-pci@vger.kernel.org
Subject: Re: New Defects reported by Coverity Scan for Linux
Date: Mon, 8 Feb 2021 23:19:44 +0100 [thread overview]
Message-ID: <YCG5AHUbK4LjdujQ@rocinante> (raw)
In-Reply-To: <20210208162651.GA392069@bjorn-Precision-5520>
[+cc Fabio]
Hi Bjorn, Lorenzo and Rob,
[...]
> > *** CID 1472841: Error handling issues (CHECKED_RETURN)
> > /drivers/pci/controller/dwc/pci-exynos.c: 263 in exynos_pcie_host_init()
> > 257
> > 258 pp->bridge->ops = &exynos_pci_ops;
> > 259
> > 260 exynos_pcie_assert_core_reset(ep);
> > 261
> > 262 phy_reset(ep->phy);
> > >>> CID 1472841: Error handling issues (CHECKED_RETURN)
> > >>> Calling "phy_power_on" without checking return value (as is done elsewhere 40 out of 50 times).
> > 263 phy_power_on(ep->phy);
> > 264 phy_init(ep->phy);
> > 265
> > 266 exynos_pcie_deassert_core_reset(ep);
> > 267 exynos_pcie_enable_irq_pulse(ep);
> > 268
We also have the following defect detected in the same file, and it's of
an identical nature - lack of error checking. The reported defect:
263 phy_power_on(ep->phy);
CID 1471267 (#1 of 1): Unchecked return value (CHECKED_RETURN)
2. check_return: Calling phy_init without checking return value (as is done elsewhere 41 out of 49 times).
264 phy_init(ep->phy);
This would also be quite trivial to fix, but I don't know much about
Exons, thus I am not sure if there is anything special it would need
aside of perhaps phy_power_off() and phy_exit(), etc.
Krzysztof
next prev parent reply other threads:[~2021-02-08 22:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <6020c2368a549_2dfbcf2b02da5acf501000c7@prd-scan-dashboard-0.mail>
2021-02-08 16:26 ` New Defects reported by Coverity Scan for Linux Bjorn Helgaas
2021-02-08 22:19 ` Krzysztof Wilczyński [this message]
[not found] <60d0439a1c15c_16db9f2ab48dcf79b875634@prd-scan-dashboard-0.mail>
2021-06-21 12:44 ` Bjorn Helgaas
2021-06-21 13:05 ` Bjorn Helgaas
2021-06-21 14:14 ` Om Prakash Singh
2020-11-10 17:16 Bjorn Helgaas
2020-11-10 23:36 ` Gustavo Pimentel
2020-11-11 15:34 ` Rob Herring
2020-11-11 21:06 ` Bjorn Helgaas
2020-11-11 22:10 ` Rob Herring
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=YCG5AHUbK4LjdujQ@rocinante \
--to=kw@linux.com \
--cc=festevam@gmail.com \
--cc=helgaas@kernel.org \
--cc=jingoohan1@gmail.com \
--cc=linux-pci@vger.kernel.org \
--cc=lorenzo.pieralisi@arm.com \
--cc=robh@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).