From: neil.armstrong@linaro.org
To: Johan Hovold <johan+linaro@kernel.org>, Vinod Koul <vkoul@kernel.org>
Cc: Kishon Vijay Abraham I <kishon@kernel.org>,
Wesley Cheng <quic_wcheng@quicinc.com>,
Melody Olvera <melody.olvera@oss.qualcomm.com>,
linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] phy: qcom: m31-eusb2: fix match data santity check
Date: Tue, 17 Jun 2025 10:20:25 +0200 [thread overview]
Message-ID: <b56ae254-2b13-4a28-bd97-c815ee773abb@linaro.org> (raw)
In-Reply-To: <20250617080503.11262-1-johan+linaro@kernel.org>
On 17/06/2025 10:05, Johan Hovold wrote:
> The device_get_match_data() helper returns NULL if a new entry is ever
> added without corresponding match data.
>
> Fixes: 9c8504861cc4 ("phy: qcom: Add M31 based eUSB2 PHY driver")
> Cc: Wesley Cheng <quic_wcheng@quicinc.com>
> Cc: Melody Olvera <melody.olvera@oss.qualcomm.com>
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
> drivers/phy/qualcomm/phy-qcom-m31-eusb2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c
> index 9b987911fcdb..9ad7af503baa 100644
> --- a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c
> +++ b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c
> @@ -252,7 +252,7 @@ static int m31eusb2_phy_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> data = device_get_match_data(dev);
> - if (IS_ERR(data))
> + if (!data)
> return -EINVAL;
> phy->data = data;
>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
--
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy
next prev parent reply other threads:[~2025-06-17 8:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-17 8:05 [PATCH] phy: qcom: m31-eusb2: fix match data santity check Johan Hovold
2025-06-17 8:20 ` neil.armstrong [this message]
2025-06-27 0:47 ` Vinod Koul
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=b56ae254-2b13-4a28-bd97-c815ee773abb@linaro.org \
--to=neil.armstrong@linaro.org \
--cc=johan+linaro@kernel.org \
--cc=kishon@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-phy@lists.infradead.org \
--cc=melody.olvera@oss.qualcomm.com \
--cc=quic_wcheng@quicinc.com \
--cc=vkoul@kernel.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