diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2025-06-17 10:05:03 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2025-06-26 17:10:12 -0700 |
commit | 603bd9808f58009e1f230271f94e1b9e13d506ba (patch) | |
tree | ae20172a7a33fd983eb9dd9f97b0cd7c2b195c5c | |
parent | 03aa45d6c62d6861dcbcff627d88814c0ddecc88 (diff) |
phy: qcom: m31-eusb2: fix match data santity check
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>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250617080503.11262-1-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
-rw-r--r-- | drivers/phy/qualcomm/phy-qcom-m31-eusb2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c index 7b7120e4214f0..520eabcc61f71 100644 --- a/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c +++ b/drivers/phy/qualcomm/phy-qcom-m31-eusb2.c @@ -253,7 +253,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; |