From: "Garg, Aksh" <a-garg7@ti.com>
To: "Anton Protopopov" <a.s.protopopov@gmail.com>,
"Raghavendra, Vignesh" <vigneshr@ti.com>,
"Vadapalli, Siddharth" <s-vadapalli@ti.com>,
"Manivannan Sadhasivam" <mani@kernel.org>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Rob Herring" <robh@kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: j721e: Properly check the error of a syscon lookup
Date: Fri, 27 Nov 2026 10:36:17 +0000 [thread overview]
Message-ID: <bbeeaa27-6210-4b44-b7d7-8f7fd1a1ae08@ti.com> (raw)
In-Reply-To: <20261127101915.1348807-1-a.s.protopopov@gmail.com>
On 27/11/26 15:49, Anton Protopopov wrote:
> The syscon_regmap_lookup_by_phandle_optional() function returns NULL
> only when the property is missing (-ENODEV). On other errors it returns
> an error pointer. The j721e_pcie_ctrl_init() function checks only for
> NULL and passes an error pointer to j721e_enable_acspcie_refclk(),
> which uses it as a regmap. Propagate the error instead.
>
> Fixes: 82c4be4168e2 ("PCI: j721e: Enable ACSPCIE Refclk if "ti,syscon-acspcie-proxy-ctrl" exists")
> Signed-off-by: Anton Protopopov <a.s.protopopov@gmail.com>
> ---
Reviewed-by: Aksh Garg <a-garg7@ti.com>
Regards,
Aksh Garg
>
> (Accidentally bumped into this while working on BPF stuff.)
>
> drivers/pci/controller/cadence/pci-j721e.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/pci/controller/cadence/pci-j721e.c b/drivers/pci/controller/cadence/pci-j721e.c
> index 822602836b12..fdae51e368e0 100644
> --- a/drivers/pci/controller/cadence/pci-j721e.c
> +++ b/drivers/pci/controller/cadence/pci-j721e.c
> @@ -334,6 +334,8 @@ static int j721e_pcie_ctrl_init(struct j721e_pcie *pcie)
> "ti,syscon-acspcie-proxy-ctrl");
> if (!syscon)
> return 0;
> + if (IS_ERR(syscon))
> + return PTR_ERR(syscon);
>
> return j721e_enable_acspcie_refclk(pcie, syscon);
> }
prev parent reply other threads:[~2026-11-27 10:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-27 10:19 Anton Protopopov
2026-11-27 10:36 ` Garg, Aksh [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=bbeeaa27-6210-4b44-b7d7-8f7fd1a1ae08@ti.com \
--to=a-garg7@ti.com \
--cc=a.s.protopopov@gmail.com \
--cc=bhelgaas@google.com \
--cc=kwilczynski@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=mani@kernel.org \
--cc=robh@kernel.org \
--cc=s-vadapalli@ti.com \
--cc=vigneshr@ti.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
all inboxes | Powered by JetHome®