Hello. On 05/31/2013 10:38 PM, Michael Grzeschik wrote:
From: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/usb/chipidea/ci13xxx_imx.c | 41 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/drivers/usb/chipidea/ci13xxx_imx.c b/drivers/usb/chipidea/ci13xxx_imx.c index 4d64541..48c446b 100644 --- a/drivers/usb/chipidea/ci13xxx_imx.c +++ b/drivers/usb/chipidea/ci13xxx_imx.c
[...]
@@ -140,19 +139,21 @@ static int ci13xxx_imx_probe(struct platform_device *pdev)
[...]
+ phy = devm_usb_get_phy_by_phandle(&pdev->dev, "fsl,usbphy", 0); +
Empty line is not really needed here, don't you think?
+ if (PTR_ERR(phy) == -EPROBE_DEFER) {
Hm, can PTR_ERR() be called on non-error pointers? Seems so...
+ ret = -EPROBE_DEFER; + goto err_clk; + } + + if (!IS_ERR(phy)) { + ret = usb_phy_init(phy); + if (ret) { + dev_err(&pdev->dev, "unable to init phy: %d\n", ret); + goto err_clk; } + + data->phy = phy; }
Shouldn't this come first instead, with the above PTR_ERR() condition in
the *else* branch? WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html