arm: tegra: usb_phy: set vbus_reg to NULL
Petlozu Pravareshwar [Wed, 12 Sep 2012 09:42:36 +0000 (14:42 +0530)]
Setting vbus_reg to NULL if regulator get
fails.

Bug 1047065

Change-Id: I574f58d46f226d70034a4f363103fd9763482292
Signed-off-by: Petlozu Pravareshwar <petlozup@nvidia.com>
Reviewed-on: http://git-master/r/131759
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>

arch/arm/mach-tegra/usb_phy.c

index 9288144..2a7364c 100644 (file)
@@ -315,6 +315,7 @@ struct tegra_usb_phy *tegra_usb_phy_open(struct platform_device *pdev)
                                 instance : %d\n", PTR_ERR(phy->vbus_reg),
                                                                phy->inst);
                                err = PTR_ERR(phy->vbus_reg);
+                               phy->vbus_reg = NULL;
                                goto fail_init;
                        }
                } else {