linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [bug report] phy: qcom: Add QCOM SNPS eUSB2 driver
@ 2025-05-23 15:59 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2025-05-23 15:59 UTC (permalink / raw)
  To: Abel Vesa; +Cc: linux-phy

Hello Abel Vesa,

Commit 80090810f5d3 ("phy: qcom: Add QCOM SNPS eUSB2 driver") from
Feb 8, 2023 (linux-next), leads to the following Smatch static
checker warning:

	drivers/phy/phy-snps-eusb2.c:571 snps_eusb2_hsphy_probe()
	warn: passing zero to 'PTR_ERR'

drivers/phy/phy-snps-eusb2.c
    557         ret = devm_clk_bulk_get(dev, phy->data->num_clks, phy->clks);
    558         if (ret)
    559                 return dev_err_probe(dev, ret,
    560                                      "failed to get phy clock(s)\n");
    561 
    562         phy->ref_clk = NULL;
                ^^^^^^^^^^^^^^^^^^^^

    563         for (int i = 0; i < phy->data->num_clks; ++i) {
    564                 if (!strcmp(phy->clks[i].id, "ref")) {
    565                         phy->ref_clk = phy->clks[i].clk;
    566                         break;
    567                 }
    568         }
    569 
    570         if (IS_ERR_OR_NULL(phy->ref_clk))
--> 571                 return dev_err_probe(dev, PTR_ERR(phy->ref_clk),
                                                  ^^^^^^^^^^^^^^^^^^^^^
PTR_ERR(NULL) is success.

    572                                      "failed to get ref clk\n");
    573 
    574         num = ARRAY_SIZE(phy->vregs);
    575         for (i = 0; i < num; i++)

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:[~2025-05-23 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 15:59 [bug report] phy: qcom: Add QCOM SNPS eUSB2 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;
as well as URLs for NNTP newsgroup(s).