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-p-wuxga-10-1.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-p-wuxga-10-1.c')
-rw-r--r-- | arch/arm/mach-tegra/panel-p-wuxga-10-1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/panel-p-wuxga-10-1.c b/arch/arm/mach-tegra/panel-p-wuxga-10-1.c index 7cf6556a6d18..cb0e9a0e4550 100644 --- a/arch/arm/mach-tegra/panel-p-wuxga-10-1.c +++ b/arch/arm/mach-tegra/panel-p-wuxga-10-1.c @@ -150,7 +150,7 @@ static int dalmore_dsi_regulator_get(struct device *dev) if (reg_requested) return 0; avdd_lcd_3v3 = regulator_get(dev, "avdd_lcd"); - if (IS_ERR_OR_NULL(avdd_lcd_3v3)) { + if (IS_ERR(avdd_lcd_3v3)) { pr_err("avdd_lcd regulator get failed\n"); err = PTR_ERR(avdd_lcd_3v3); avdd_lcd_3v3 = NULL; @@ -158,7 +158,7 @@ static int dalmore_dsi_regulator_get(struct device *dev) } dvdd_lcd_1v8 = regulator_get(dev, "dvdd_lcd"); - if (IS_ERR_OR_NULL(dvdd_lcd_1v8)) { + if (IS_ERR(dvdd_lcd_1v8)) { pr_err("dvdd_lcd_1v8 regulator get failed\n"); err = PTR_ERR(dvdd_lcd_1v8); dvdd_lcd_1v8 = NULL; @@ -166,7 +166,7 @@ static int dalmore_dsi_regulator_get(struct device *dev) } 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; @@ -174,7 +174,7 @@ static int dalmore_dsi_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; @@ -221,7 +221,7 @@ static int macallan_dsi_regulator_get(struct device *dev) if (reg_requested) return 0; avdd_lcd_3v3 = regulator_get(dev, "avdd_lcd"); - if (IS_ERR_OR_NULL(avdd_lcd_3v3)) { + if (IS_ERR(avdd_lcd_3v3)) { pr_err("avdd_lcd regulator get failed\n"); err = PTR_ERR(avdd_lcd_3v3); avdd_lcd_3v3 = NULL; @@ -229,7 +229,7 @@ static int macallan_dsi_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; |