All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: qualcomm: Check NULL ptr on data
@ 2024-08-14 14:11 ` Ma Ke
  0 siblings, 0 replies; 4+ messages in thread
From: Ma Ke @ 2024-08-14 14:11 UTC (permalink / raw)
  To: vkoul, kishon, make24, ansuelsmth, agross
  Cc: linux-arm-msm, linux-phy, linux-kernel, stable

Check NULL ptr on data, verify that data is not NULL before using it.

Cc: stable@vger.kernel.org
Fixes: ef19b117b834 ("phy: qualcomm: add qcom ipq806x dwc usb phy driver")
Signed-off-by: Ma Ke <make24@iscas.ac.cn>
---
 drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c b/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c
index 06392ed7c91b..9b9fd9c1b1f7 100644
--- a/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-ipq806x-usb.c
@@ -492,6 +492,8 @@ static int qcom_ipq806x_usb_phy_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	data = of_device_get_match_data(&pdev->dev);
+	if (!data)
+		return -ENODEV;
 
 	phy_dwc3->dev = &pdev->dev;
 
-- 
2.25.1


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

end of thread, other threads:[~2024-08-14 14:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-14 14:11 [PATCH] phy: qualcomm: Check NULL ptr on data Ma Ke
2024-08-14 14:11 ` Ma Ke
2024-08-14 14:49 ` Greg KH
2024-08-14 14:49   ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.