Skip to content

Commit 603bd98

Browse files
jhovoldvinodkoul
authored andcommitted
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: 9c85048 ("phy: qcom: Add M31 based eUSB2 PHY driver") Cc: Wesley Cheng <[email protected]> Cc: Melody Olvera <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Reviewed-by: Neil Armstrong <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 03aa45d commit 603bd98

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/phy/qualcomm/phy-qcom-m31-eusb2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ static int m31eusb2_phy_probe(struct platform_device *pdev)
253253
return -ENOMEM;
254254

255255
data = device_get_match_data(dev);
256-
if (IS_ERR(data))
256+
if (!data)
257257
return -EINVAL;
258258
phy->data = data;
259259

0 commit comments

Comments
 (0)