public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
* [bug report] phy: eswin: Create eswin directory and add EIC7700 SATA PHY driver
@ 2026-04-10 10:14 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2026-04-10 10:14 UTC (permalink / raw)
  To: Yulin Lu; +Cc: linux-phy

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-04-10 10:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-10 10:14 [bug report] phy: eswin: Create eswin directory and add EIC7700 SATA PHY driver Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox