summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-dalmore-sdhci.c
diff options
context:
space:
mode:
authorMallikarjun Kasoju <mkasoju@nvidia.com>2013-11-22 15:40:12 +0530
committerLaxman Dewangan <ldewangan@nvidia.com>2013-11-25 01:36:06 -0800
commite08c5b75b14b81ddacfd423727a87e7a020934ca (patch)
tree5f29cd8fdbc2394170d5482febc43a644129c8c4 /arch/arm/mach-tegra/board-dalmore-sdhci.c
parent2bd68779e8a2c04ea2f6aaf34884765988d69fb0 (diff)
ARM: tegra: fix regulator_get() return value check
regulator_get() returns either error pointer or valid pointers. It never returns NULL. Hence it is not a correct to check the return pointer as IS_ERR_OR_NULL(). It should be only IS_ERR(). Bug 1410234 Change-Id: I8cf668ca0bced49ee4f47ccf9b02d70fd0263cd6 Signed-off-by: Mallikarjun Kasoju <mkasoju@nvidia.com> Reviewed-on: http://git-master/r/334471 GVS: Gerrit_Virtual_Submit Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-dalmore-sdhci.c')
-rw-r--r--arch/arm/mach-tegra/board-dalmore-sdhci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-tegra/board-dalmore-sdhci.c b/arch/arm/mach-tegra/board-dalmore-sdhci.c
index 1019fa458ff5..1933479888c4 100644
--- a/arch/arm/mach-tegra/board-dalmore-sdhci.c
+++ b/arch/arm/mach-tegra/board-dalmore-sdhci.c
@@ -248,7 +248,7 @@ static int dalmore_wifi_regulator_enable(void)
if (IS_ERR_OR_NULL(dalmore_vdd_com_3v3)) {
dalmore_vdd_com_3v3 = regulator_get(&dalmore_wifi_device.dev,
DALMORE_VDD_WIFI_3V3);
- if (IS_ERR_OR_NULL(dalmore_vdd_com_3v3)) {
+ if (IS_ERR(dalmore_vdd_com_3v3)) {
pr_err("Couldn't get regulator "
DALMORE_VDD_WIFI_3V3 "\n");
return PTR_ERR(dalmore_vdd_com_3v3);
@@ -268,7 +268,7 @@ static int dalmore_wifi_regulator_enable(void)
if (IS_ERR_OR_NULL(dalmore_vddio_com_1v8)) {
dalmore_vddio_com_1v8 = regulator_get(&dalmore_wifi_device.dev,
DALMORE_VDD_WIFI_1V8);
- if (IS_ERR_OR_NULL(dalmore_vddio_com_1v8)) {
+ if (IS_ERR(dalmore_vddio_com_1v8)) {
pr_err("Couldn't get regulator "
DALMORE_VDD_WIFI_1V8 "\n");
regulator_disable(dalmore_vdd_com_3v3);