From: Dan Carpenter <error27@gmail.com>
To: Yulin Lu <luyulin@eswincomputing.com>
Cc: linux-phy@lists.infradead.org
Subject: [bug report] phy: eswin: Create eswin directory and add EIC7700 SATA PHY driver
Date: Fri, 10 Apr 2026 13:14:06 +0300 [thread overview]
Message-ID: <adjNbuWoc1B-3Ok1@stanley.mountain> (raw)
Hello Yulin Lu,
Commit 67ee9ccaa34a ("phy: eswin: Create eswin directory and add
EIC7700 SATA PHY driver") from Feb 5, 2026 (linux-next), leads to the
following Smatch static checker warning:
drivers/phy/eswin/phy-eic7700-sata.c:219 eic7700_sata_phy_probe()
warn: 'regs' is not an error pointer
drivers/phy/eswin/phy-eic7700-sata.c
194 static int eic7700_sata_phy_probe(struct platform_device *pdev)
195 {
196 struct eic7700_sata_phy *sata_phy;
197 struct phy_provider *phy_provider;
198 struct device *dev = &pdev->dev;
199 struct device_node *np = dev->of_node;
200 struct resource *res;
201 void __iomem *regs;
202
203 sata_phy = devm_kzalloc(dev, sizeof(*sata_phy), GFP_KERNEL);
204 if (!sata_phy)
205 return -ENOMEM;
206
207 /*
208 * Map the I/O resource with platform_get_resource and devm_ioremap
209 * instead of the devm_platform_ioremap_resource API, because the
210 * address region of the SATA-PHY falls into the region of the HSP
211 * clock & reset that has already been obtained by the HSP
212 * clock-and-reset driver.
213 */
214 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
215 if (!res)
216 return -ENOENT;
217
218 regs = devm_ioremap(dev, res->start, resource_size(res));
--> 219 if (IS_ERR(regs))
220 return PTR_ERR(regs);
if (!regs)
return -ENOMEM;
221
222 sata_phy->regmap = devm_regmap_init_mmio
This email is a free service from the Smatch-CI project [smatch.sf.net].
regards,
dan carpenter
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
reply other threads:[~2026-04-10 10:14 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=adjNbuWoc1B-3Ok1@stanley.mountain \
--to=error27@gmail.com \
--cc=linux-phy@lists.infradead.org \
--cc=luyulin@eswincomputing.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