linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@linaro.org>
To: Abel Vesa <abel.vesa@linaro.org>
Cc: linux-phy@lists.infradead.org
Subject: [bug report] phy: qcom: Add QCOM SNPS eUSB2 driver
Date: Fri, 23 May 2025 18:59:54 +0300	[thread overview]
Message-ID: <aDCbeuCTy9zyWJAM@stanley.mountain> (raw)

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

                 reply	other threads:[~2025-05-23 16:25 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=aDCbeuCTy9zyWJAM@stanley.mountain \
    --to=dan.carpenter@linaro.org \
    --cc=abel.vesa@linaro.org \
    --cc=linux-phy@lists.infradead.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).