Re: [PATCH v3 08/10] usb: phy: tegra: Add error handling & cleanup.

From: Sergei Shtylyov
Date: Fri May 10 2013 - 14:06:48 EST


Hello.

On 05/10/2013 05:54 PM, Venu Byravarasu wrote:

Check return values from all GPIO APIs and handle errors accordingly.

Remove the call to clk_disable_unprepare(); this function does not
prepare or enable the clock, so the error path should not disable or
unprepare it.

Signed-off-by: Venu Byravarasu <vbyravarasu@xxxxxxxxxx>
[...]
diff --git a/drivers/usb/phy/phy-tegra-usb.c b/drivers/usb/phy/phy-tegra-usb.c
index a2a89a9..dce692a 100644
--- a/drivers/usb/phy/phy-tegra-usb.c
+++ b/drivers/usb/phy/phy-tegra-usb.c
[...]
@@ -624,24 +632,44 @@ static int tegra_phy_init(struct usb_phy *x)
[...]
phy->ulpi = otg_ulpi_create(&ulpi_viewport_access_ops, 0);
+ if (!phy->ulpi) {
+ dev_err(phy->dev, "otg_ulpi_create returned err\n");

Rather "returned NULL".

WBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/