Commit 603bd980 authored by Johan Hovold's avatar Johan Hovold Committed by Vinod Koul
Browse files

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: 9c850486 ("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: default avatarJohan Hovold <johan+linaro@kernel.org>
Reviewed-by: default avatarNeil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250617080503.11262-1-johan+linaro@kernel.org


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 03aa45d6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;