arm: tegra: Fix coverity issue
Sri Krishna chowdary [Mon, 17 Sep 2012 05:03:54 +0000 (10:03 +0530)]
Differentiate between success and failure of gpio_request.

Bug 1046331

Change-Id: I400d574e8fd492739cd0dffb3a96f8801c624a3e
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/133167
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>

arch/arm/mach-tegra/board-cardhu.c

index 5f51a7a..1dc2246 100644 (file)
@@ -1038,7 +1038,7 @@ static int hsic_reset_gpio = -1;
 
 void hsic_platform_open(void)
 {
-       int reset_gpio = 0, enable_gpio = 0;
+       int reset_gpio = -1, enable_gpio = -1;
 
        if (hsic_enable_gpio != -1)
                enable_gpio = gpio_request(hsic_enable_gpio, "uhsic_enable");