Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 16853d7b authored by Markus Pargmann's avatar Markus Pargmann Committed by Greg Kroah-Hartman
Browse files

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: default avatarMarkus Pargmann <mpa@pengutronix.de>
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9672f0fe
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -133,6 +133,9 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
	data->phy = devm_usb_get_phy_by_phandle(&pdev->dev, "fsl,usbphy", 0);
	if (IS_ERR(data->phy)) {
		ret = PTR_ERR(data->phy);
		/* Return -EINVAL if no usbphy is available */
		if (ret == -ENODEV)
			ret = -EINVAL;
		goto err_clk;
	}