diff options
author | Mallikarjun Kasoju <mkasoju@nvidia.com> | 2013-11-22 15:40:12 +0530 |
---|---|---|
committer | Laxman Dewangan <ldewangan@nvidia.com> | 2013-11-25 01:36:06 -0800 |
commit | e08c5b75b14b81ddacfd423727a87e7a020934ca (patch) | |
tree | 5f29cd8fdbc2394170d5482febc43a644129c8c4 /arch/arm/mach-tegra/panel-l-720p-5-loki.c | |
parent | 2bd68779e8a2c04ea2f6aaf34884765988d69fb0 (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/panel-l-720p-5-loki.c')
-rw-r--r-- | arch/arm/mach-tegra/panel-l-720p-5-loki.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/panel-l-720p-5-loki.c b/arch/arm/mach-tegra/panel-l-720p-5-loki.c index e2c276c432a9..44b2b5edbd02 100644 --- a/arch/arm/mach-tegra/panel-l-720p-5-loki.c +++ b/arch/arm/mach-tegra/panel-l-720p-5-loki.c @@ -367,14 +367,14 @@ static int dsi_l_720p_5_loki_regulator_get(struct device *dev) return 0; avdd_lcd_3v0_2v8 = regulator_get(dev, "avdd_lcd"); - if (IS_ERR_OR_NULL(avdd_lcd_3v0_2v8)) { + if (IS_ERR(avdd_lcd_3v0_2v8)) { pr_err("avdd_lcd regulator get failed\n"); err = PTR_ERR(avdd_lcd_3v0_2v8); avdd_lcd_3v0_2v8 = NULL; goto fail; } vdd_lcd_s_1v8 = regulator_get(dev, "dvdd_lcd"); - if (IS_ERR_OR_NULL(vdd_lcd_s_1v8)) { + if (IS_ERR(vdd_lcd_s_1v8)) { pr_err("vdd_lcd_1v8_s regulator get failed\n"); err = PTR_ERR(vdd_lcd_s_1v8); vdd_lcd_s_1v8 = NULL; @@ -383,7 +383,7 @@ static int dsi_l_720p_5_loki_regulator_get(struct device *dev) if (machine_is_dalmore()) { vdd_lcd_bl = regulator_get(dev, "vdd_lcd_bl"); - if (IS_ERR_OR_NULL(vdd_lcd_bl)) { + if (IS_ERR(vdd_lcd_bl)) { pr_err("vdd_lcd_bl regulator get failed\n"); err = PTR_ERR(vdd_lcd_bl); vdd_lcd_bl = NULL; @@ -392,7 +392,7 @@ static int dsi_l_720p_5_loki_regulator_get(struct device *dev) } vdd_lcd_bl_en = regulator_get(dev, "vdd_lcd_bl_en"); - if (IS_ERR_OR_NULL(vdd_lcd_bl_en)) { + if (IS_ERR(vdd_lcd_bl_en)) { pr_err("vdd_lcd_bl_en regulator get failed\n"); err = PTR_ERR(vdd_lcd_bl_en); vdd_lcd_bl_en = NULL; |