summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/ci_hdrc_imx.c
diff options
context:
space:
mode:
authorMarkus Pargmann2014-07-22 04:09:43 +0200
committerGreg Kroah-Hartman2014-07-23 01:31:36 +0200
commit16853d7bcb6dd5806534c63051580472b4aa4560 (patch)
treeab706db641808da3a87db9a3e1f708f78c20d09f /drivers/usb/chipidea/ci_hdrc_imx.c
parentusb: core: allow zero packet flag for interrupt urbs (diff)
downloadkernel-qcow2-linux-16853d7bcb6dd5806534c63051580472b4aa4560.tar.gz
kernel-qcow2-linux-16853d7bcb6dd5806534c63051580472b4aa4560.tar.xz
kernel-qcow2-linux-16853d7bcb6dd5806534c63051580472b4aa4560.zip
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 <mpa@pengutronix.de> Signed-off-by: Peter Chen <peter.chen@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/ci_hdrc_imx.c')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 2e58f8dfd311..65444b02bd68 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -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;
}