Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: qcom: m31-eusb2: fix match data santity check
@ 2025-06-17  8:05 Johan Hovold
  2025-06-17  8:20 ` neil.armstrong
  2025-06-27  0:47 ` Vinod Koul
  0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2025-06-17  8:05 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Kishon Vijay Abraham I, Wesley Cheng, Melody Olvera,
	linux-arm-msm, linux-phy, linux-kernel, Johan Hovold

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;
 
-- 
2.49.0


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-06-27  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-17  8:05 [PATCH] phy: qcom: m31-eusb2: fix match data santity check Johan Hovold
2025-06-17  8:20 ` neil.armstrong
2025-06-27  0:47 ` Vinod Koul

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