Skip to content

Commit 16853d7

Browse files
Markus Pargmanngregkh
authored andcommitted
usb: ci_hdrc_imx: Return -EINVAL for missing USB PHY
-ENODEV is interpreted by the generic driver probing function as a non-matching driver. This leads to a missing probe failure message. Also a missing USB PHY is more of an invalid configuration of the usb driver because it is necessary. This patch returns -EINVAL if devm_usb_get_phy_by_phandle() returned -ENODEV. Signed-off-by: Markus Pargmann <[email protected]> Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9672f0f commit 16853d7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/usb/chipidea/ci_hdrc_imx.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
133133
data->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "fsl,usbphy", 0);
134134
if (IS_ERR(data->phy)) {
135135
ret = PTR_ERR(data->phy);
136+
/* Return -EINVAL if no usbphy is available */
137+
if (ret == -ENODEV)
138+
ret = -EINVAL;
136139
goto err_clk;
137140
}
138141

0 commit comments

Comments
 (0)