ARM: tegra: fix regulator_get() return value check
Mallikarjun Kasoju [Fri, 22 Nov 2013 10:10:12 +0000 (15:10 +0530)]
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>

27 files changed:
arch/arm/mach-tegra/board-ardbeg-panel.c
arch/arm/mach-tegra/board-bonaire-panel.c
arch/arm/mach-tegra/board-dalmore-panel.c
arch/arm/mach-tegra/board-dalmore-sdhci.c
arch/arm/mach-tegra/board-loki-panel.c
arch/arm/mach-tegra/board-loki-sdhci.c
arch/arm/mach-tegra/board-macallan-panel.c
arch/arm/mach-tegra/board-pismo-panel.c
arch/arm/mach-tegra/board-pismo-sdhci.c
arch/arm/mach-tegra/board-pluto-panel.c
arch/arm/mach-tegra/board-roth-panel.c
arch/arm/mach-tegra/board-roth-sdhci.c
arch/arm/mach-tegra/panel-a-1080p-11-6.c
arch/arm/mach-tegra/panel-a-1080p-14-0.c
arch/arm/mach-tegra/panel-a-edp-1080p-14-0.c
arch/arm/mach-tegra/panel-c-lvds-1366-14.c
arch/arm/mach-tegra/panel-j-1440-810-5-8.c
arch/arm/mach-tegra/panel-j-720p-4-7.c
arch/arm/mach-tegra/panel-l-720p-5-loki.c
arch/arm/mach-tegra/panel-l-720p-5.c
arch/arm/mach-tegra/panel-lgd-wxga-7-0.c
arch/arm/mach-tegra/panel-p-wuxga-10-1.c
arch/arm/mach-tegra/panel-s-1080p-5.c
arch/arm/mach-tegra/panel-s-edp-uhdtv-15-6.c
arch/arm/mach-tegra/panel-s-edp-wqxgap-15-6.c
arch/arm/mach-tegra/panel-s-wqxga-10-1.c
arch/arm/mach-tegra/tegra_bb.c

index f5584c2..8e20fde 100644 (file)
@@ -199,7 +199,7 @@ static int ardbeg_hdmi_enable(struct device *dev)
        int ret;
        if (!ardbeg_hdmi_reg) {
                ardbeg_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(ardbeg_hdmi_reg)) {
+               if (IS_ERR(ardbeg_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        ardbeg_hdmi_reg = NULL;
                        return PTR_ERR(ardbeg_hdmi_reg);
@@ -212,7 +212,7 @@ static int ardbeg_hdmi_enable(struct device *dev)
        }
        if (!ardbeg_hdmi_pll) {
                ardbeg_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(ardbeg_hdmi_pll)) {
+               if (IS_ERR(ardbeg_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        ardbeg_hdmi_pll = NULL;
                        regulator_put(ardbeg_hdmi_reg);
index 4a3f04a..a271ccb 100644 (file)
@@ -418,7 +418,7 @@ static int bonaire_dsi_panel_enable(void)
 
        if (bonaire_dsi_reg == NULL) {
                bonaire_dsi_reg = regulator_get(NULL, "avdd_dsi_csi");
-               if (IS_ERR_OR_NULL(bonaire_dsi_reg)) {
+               if (IS_ERR(bonaire_dsi_reg)) {
                pr_err("dsi: Could not get regulator avdd_dsi_csi\n");
                        bonaire_dsi_reg = NULL;
                        return PTR_ERR(bonaire_dsi_reg);
index ab47791..332514a 100644 (file)
@@ -149,7 +149,7 @@ static int dalmore_hdmi_enable(struct device *dev)
        int ret;
        if (!dalmore_hdmi_reg) {
                dalmore_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(dalmore_hdmi_reg)) {
+               if (IS_ERR(dalmore_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        dalmore_hdmi_reg = NULL;
                        return PTR_ERR(dalmore_hdmi_reg);
@@ -162,7 +162,7 @@ static int dalmore_hdmi_enable(struct device *dev)
        }
        if (!dalmore_hdmi_pll) {
                dalmore_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(dalmore_hdmi_pll)) {
+               if (IS_ERR(dalmore_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        dalmore_hdmi_pll = NULL;
                        regulator_put(dalmore_hdmi_reg);
index 1019fa4..1933479 100644 (file)
@@ -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);
index ba6b536..a2ac263 100644 (file)
@@ -143,7 +143,7 @@ static int loki_hdmi_enable(struct device *dev)
        int ret;
        if (!loki_hdmi_reg) {
                loki_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(loki_hdmi_reg)) {
+               if (IS_ERR(loki_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        loki_hdmi_reg = NULL;
                        return PTR_ERR(loki_hdmi_reg);
@@ -156,7 +156,7 @@ static int loki_hdmi_enable(struct device *dev)
        }
        if (!loki_hdmi_pll) {
                loki_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(loki_hdmi_pll)) {
+               if (IS_ERR(loki_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        loki_hdmi_pll = NULL;
                        regulator_put(loki_hdmi_reg);
index d6511b8..c109a4b 100644 (file)
@@ -250,7 +250,7 @@ static int loki_wifi_regulator_enable(void)
        if (IS_ERR_OR_NULL(loki_vdd_com_3v3)) {
                loki_vdd_com_3v3 = regulator_get(&loki_wifi_device.dev,
                                        LOKI_VDD_WIFI_3V3);
-               if (IS_ERR_OR_NULL(loki_vdd_com_3v3)) {
+               if (IS_ERR(loki_vdd_com_3v3)) {
                        pr_err("Couldn't get regulator "
                                LOKI_VDD_WIFI_3V3 "\n");
                        return PTR_ERR(loki_vdd_com_3v3);
@@ -270,7 +270,7 @@ static int loki_wifi_regulator_enable(void)
        if (IS_ERR_OR_NULL(loki_vddio_com_1v8)) {
                loki_vddio_com_1v8 = regulator_get(&loki_wifi_device.dev,
                        LOKI_VDD_WIFI_1V8);
-               if (IS_ERR_OR_NULL(loki_vddio_com_1v8)) {
+               if (IS_ERR(loki_vddio_com_1v8)) {
                        pr_err("Couldn't get regulator "
                                LOKI_VDD_WIFI_1V8 "\n");
                        regulator_disable(loki_vdd_com_3v3);
index 702178e..2b10b2b 100644 (file)
@@ -150,7 +150,7 @@ static int macallan_hdmi_enable(struct device *dev)
        int ret;
        if (!macallan_hdmi_reg) {
                macallan_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(macallan_hdmi_reg)) {
+               if (IS_ERR(macallan_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        macallan_hdmi_reg = NULL;
                        return PTR_ERR(macallan_hdmi_reg);
@@ -163,7 +163,7 @@ static int macallan_hdmi_enable(struct device *dev)
        }
        if (!macallan_hdmi_pll) {
                macallan_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(macallan_hdmi_pll)) {
+               if (IS_ERR(macallan_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        macallan_hdmi_pll = NULL;
                        regulator_put(macallan_hdmi_reg);
index 5db0b14..d715f33 100644 (file)
@@ -149,7 +149,7 @@ static int pismo_hdmi_enable(struct device *dev)
        int ret;
        if (!pismo_hdmi_reg) {
                pismo_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(pismo_hdmi_reg)) {
+               if (IS_ERR(pismo_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        pismo_hdmi_reg = NULL;
                        return PTR_ERR(pismo_hdmi_reg);
@@ -162,7 +162,7 @@ static int pismo_hdmi_enable(struct device *dev)
        }
        if (!pismo_hdmi_pll) {
                pismo_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(pismo_hdmi_pll)) {
+               if (IS_ERR(pismo_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        pismo_hdmi_pll = NULL;
                        regulator_put(pismo_hdmi_reg);
index ecabfd6..1a8f35a 100644 (file)
@@ -238,7 +238,7 @@ static int pismo_wifi_regulator_enable(void)
        if (IS_ERR_OR_NULL(pismo_vdd_com_3v3)) {
                pismo_vdd_com_3v3 = regulator_get(&pismo_wifi_device.dev,
                                                        PISMO_VDD_WIFI_3V3);
-               if (IS_ERR_OR_NULL(pismo_vdd_com_3v3)) {
+               if (IS_ERR(pismo_vdd_com_3v3)) {
                        pr_err("Couldn't get regulator "
                                PISMO_VDD_WIFI_3V3 "\n");
                        return PTR_ERR(pismo_vdd_com_3v3);
@@ -258,7 +258,7 @@ static int pismo_wifi_regulator_enable(void)
        if (IS_ERR_OR_NULL(pismo_vddio_com_1v8)) {
                pismo_vddio_com_1v8 = regulator_get(&pismo_wifi_device.dev,
                        PISMO_VDD_WIFI_1V8);
-               if (IS_ERR_OR_NULL(pismo_vddio_com_1v8)) {
+               if (IS_ERR(pismo_vddio_com_1v8)) {
                        pr_err("Couldn't get regulator "
                                PISMO_VDD_WIFI_1V8 "\n");
                        regulator_disable(pismo_vdd_com_3v3);
index 2d0a777..ede994d 100644 (file)
@@ -140,7 +140,7 @@ static int pluto_hdmi_enable(struct device *dev)
        int ret;
        if (!pluto_hdmi_reg) {
                pluto_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(pluto_hdmi_reg)) {
+               if (IS_ERR(pluto_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        pluto_hdmi_reg = NULL;
                        return PTR_ERR(pluto_hdmi_reg);
@@ -153,7 +153,7 @@ static int pluto_hdmi_enable(struct device *dev)
        }
        if (!pluto_hdmi_pll) {
                pluto_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(pluto_hdmi_pll)) {
+               if (IS_ERR(pluto_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        pluto_hdmi_pll = NULL;
                        regulator_put(pluto_hdmi_reg);
@@ -201,7 +201,7 @@ static int pluto_hdmi_hotplug_init(struct device *dev)
        int ret = 0;
        if (!pluto_hdmi_vddio) {
                pluto_hdmi_vddio = regulator_get(dev, "vdd_hdmi_5v0");
-               if (IS_ERR_OR_NULL(pluto_hdmi_vddio)) {
+               if (IS_ERR(pluto_hdmi_vddio)) {
                        ret = PTR_ERR(pluto_hdmi_vddio);
                        pr_err("hdmi: couldn't get regulator vdd_hdmi_5v0\n");
                        pluto_hdmi_vddio = NULL;
index 3c702c2..d37aba8 100644 (file)
@@ -466,14 +466,14 @@ static int roth_dsi_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;
@@ -482,7 +482,7 @@ static int roth_dsi_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;
@@ -491,7 +491,7 @@ static int roth_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;
@@ -653,7 +653,7 @@ static int roth_hdmi_enable(struct device *dev)
        int ret;
        if (!roth_hdmi_reg) {
                roth_hdmi_reg = regulator_get(dev, "avdd_hdmi");
-               if (IS_ERR_OR_NULL(roth_hdmi_reg)) {
+               if (IS_ERR(roth_hdmi_reg)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi\n");
                        roth_hdmi_reg = NULL;
                        return PTR_ERR(roth_hdmi_reg);
@@ -666,7 +666,7 @@ static int roth_hdmi_enable(struct device *dev)
        }
        if (!roth_hdmi_pll) {
                roth_hdmi_pll = regulator_get(dev, "avdd_hdmi_pll");
-               if (IS_ERR_OR_NULL(roth_hdmi_pll)) {
+               if (IS_ERR(roth_hdmi_pll)) {
                        pr_err("hdmi: couldn't get regulator avdd_hdmi_pll\n");
                        roth_hdmi_pll = NULL;
                        regulator_put(roth_hdmi_reg);
index 0d334ff..a61e450 100644 (file)
@@ -246,7 +246,7 @@ static int roth_wifi_regulator_enable(void)
        if (IS_ERR_OR_NULL(roth_vdd_com_3v3)) {
                roth_vdd_com_3v3 = regulator_get(&roth_wifi_device.dev,
                                        ROTH_VDD_WIFI_3V3);
-               if (IS_ERR_OR_NULL(roth_vdd_com_3v3)) {
+               if (IS_ERR(roth_vdd_com_3v3)) {
                        pr_err("Couldn't get regulator "
                                ROTH_VDD_WIFI_3V3 "\n");
                        return PTR_ERR(roth_vdd_com_3v3);
@@ -266,7 +266,7 @@ static int roth_wifi_regulator_enable(void)
        if (IS_ERR_OR_NULL(roth_vddio_com_1v8)) {
                roth_vddio_com_1v8 = regulator_get(&roth_wifi_device.dev,
                        ROTH_VDD_WIFI_1V8);
-               if (IS_ERR_OR_NULL(roth_vddio_com_1v8)) {
+               if (IS_ERR(roth_vddio_com_1v8)) {
                        pr_err("Couldn't get regulator "
                                ROTH_VDD_WIFI_1V8 "\n");
                        regulator_disable(roth_vdd_com_3v3);
index 2d58496..18529c3 100644 (file)
@@ -133,7 +133,7 @@ static int dalmore_dsi_regulator_get(struct device *dev)
                return 0;
 
        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 regulator get failed\n");
                        err = PTR_ERR(dvdd_lcd_1v8);
                        dvdd_lcd_1v8 = NULL;
@@ -141,7 +141,7 @@ static int dalmore_dsi_regulator_get(struct device *dev)
        }
 
        vdd_ds_1v8 = regulator_get(dev, "vdd_ds_1v8");
-       if (IS_ERR_OR_NULL(vdd_ds_1v8)) {
+       if (IS_ERR(vdd_ds_1v8)) {
                pr_err("vdd_ds_1v8 regulator get failed\n");
                err = PTR_ERR(vdd_ds_1v8);
                vdd_ds_1v8 = NULL;
@@ -149,7 +149,7 @@ static int dalmore_dsi_regulator_get(struct device *dev)
        }
 
        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;
@@ -157,7 +157,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;
@@ -165,7 +165,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;
index 023133f..f3990ad 100644 (file)
@@ -121,7 +121,7 @@ static int laguna_dsi_regulator_get(struct device *dev)
                return 0;
 
        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 regulator get failed\n");
                        err = PTR_ERR(dvdd_lcd_1v8);
                        dvdd_lcd_1v8 = NULL;
@@ -129,7 +129,7 @@ static int laguna_dsi_regulator_get(struct device *dev)
        }
 
        vdd_ds_1v8 = regulator_get(dev, "vdd_ds_1v8");
-       if (IS_ERR_OR_NULL(vdd_ds_1v8)) {
+       if (IS_ERR(vdd_ds_1v8)) {
                pr_err("vdd_ds_1v8 regulator get failed\n");
                err = PTR_ERR(vdd_ds_1v8);
                vdd_ds_1v8 = NULL;
@@ -137,7 +137,7 @@ static int laguna_dsi_regulator_get(struct device *dev)
        }
 
        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;
@@ -145,7 +145,7 @@ static int laguna_dsi_regulator_get(struct device *dev)
        }
 
        vdd_1v2_en = regulator_get(dev, "vdd_1v2_en");
-       if (IS_ERR_OR_NULL(vdd_1v2_en)) {
+       if (IS_ERR(vdd_1v2_en)) {
                pr_err("vdd_1v2_en regulator get failed\n");
                err = PTR_ERR(vdd_1v2_en);
                vdd_1v2_en = NULL;
@@ -154,7 +154,7 @@ static int laguna_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;
@@ -162,7 +162,7 @@ static int laguna_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;
index 62d8139..28932f1 100644 (file)
@@ -94,7 +94,7 @@ static int laguna_edp_regulator_get(struct device *dev)
                return 0;
 
        vdd_ds_1v8 = regulator_get(dev, "vdd_ds_1v8");
-       if (IS_ERR_OR_NULL(vdd_ds_1v8)) {
+       if (IS_ERR(vdd_ds_1v8)) {
                pr_err("vdd_ds_1v8 regulator get failed\n");
                err = PTR_ERR(vdd_ds_1v8);
                vdd_ds_1v8 = NULL;
@@ -102,7 +102,7 @@ static int laguna_edp_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;
@@ -110,7 +110,7 @@ static int laguna_edp_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;
@@ -118,7 +118,7 @@ static int laguna_edp_regulator_get(struct device *dev)
        }
 
        avdd_lcd = regulator_get(dev, "avdd_lcd");
-       if (IS_ERR_OR_NULL(avdd_lcd)) {
+       if (IS_ERR(avdd_lcd)) {
                pr_err("avdd_lcd regulator get failed\n");
                err = PTR_ERR(avdd_lcd);
                avdd_lcd = NULL;
index b77b5b5..47af92c 100644 (file)
@@ -89,7 +89,7 @@ static int laguna_lvds_regulator_get(struct device *dev)
                return 0;
 
        vdd_ds_1v8 = regulator_get(dev, "vdd_ds_1v8");
-       if (IS_ERR_OR_NULL(vdd_ds_1v8)) {
+       if (IS_ERR(vdd_ds_1v8)) {
                pr_err("vdd_ds_1v8 regulator get failed\n");
                err = PTR_ERR(vdd_ds_1v8);
                vdd_ds_1v8 = NULL;
@@ -97,7 +97,7 @@ static int laguna_lvds_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;
@@ -105,7 +105,7 @@ static int laguna_lvds_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;
@@ -113,7 +113,7 @@ static int laguna_lvds_regulator_get(struct device *dev)
        }
 
        avdd_lcd = regulator_get(dev, "avdd_lcd");
-       if (IS_ERR_OR_NULL(avdd_lcd)) {
+       if (IS_ERR(avdd_lcd)) {
                pr_err("avdd_lcd regulator get failed\n");
                err = PTR_ERR(avdd_lcd);
                avdd_lcd = NULL;
@@ -121,7 +121,7 @@ static int laguna_lvds_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 regulator get failed\n");
                err = PTR_ERR(dvdd_lcd_1v8);
                dvdd_lcd_1v8 = NULL;
index 7130df0..b602fe0 100644 (file)
@@ -283,14 +283,14 @@ static int dsi_j_1440_810_5_8_reg_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;
@@ -299,7 +299,7 @@ static int dsi_j_1440_810_5_8_reg_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;
@@ -308,7 +308,7 @@ static int dsi_j_1440_810_5_8_reg_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;
index bec074d..37229ae 100644 (file)
@@ -179,7 +179,7 @@ static int dsi_j_720p_4_7_reg_get(void)
                return 0;
 
        avdd_lcd_3v0_2v8 = regulator_get(NULL, "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;
@@ -187,7 +187,7 @@ static int dsi_j_720p_4_7_reg_get(void)
        }
 
        vdd_lcd_s_1v8 = regulator_get(NULL, "vdd_lcd_1v8_s");
-       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;
@@ -195,7 +195,7 @@ static int dsi_j_720p_4_7_reg_get(void)
        }
 
        vdd_sys_bl_3v7 = regulator_get(NULL, "vdd_sys_bl");
-       if (IS_ERR_OR_NULL(vdd_sys_bl_3v7)) {
+       if (IS_ERR(vdd_sys_bl_3v7)) {
                pr_err("vdd_sys_bl regulator get failed\n");
                err = PTR_ERR(vdd_sys_bl_3v7);
                vdd_sys_bl_3v7 = NULL;
index e2c276c..44b2b5e 100644 (file)
@@ -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;
index 951b7ec..e1b8e45 100644 (file)
@@ -464,7 +464,7 @@ static int dsi_l_720p_5_reg_get(void)
 
        avdd_lcd_3v0_2v8 = regulator_get(NULL, "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;
@@ -472,7 +472,7 @@ static int dsi_l_720p_5_reg_get(void)
        }
 
        vdd_lcd_s_1v8 = regulator_get(NULL, "vdd_lcd_1v8_s");
-       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;
@@ -480,7 +480,7 @@ static int dsi_l_720p_5_reg_get(void)
        }
 
        vdd_sys_bl_3v7 = regulator_get(NULL, "vdd_sys_bl");
-       if (IS_ERR_OR_NULL(vdd_sys_bl_3v7)) {
+       if (IS_ERR(vdd_sys_bl_3v7)) {
                pr_err("vdd_sys_bl regulator get failed\n");
                err = PTR_ERR(vdd_sys_bl_3v7);
                vdd_sys_bl_3v7 = NULL;
index 429a0bd..5b4b5a3 100644 (file)
@@ -120,7 +120,7 @@ static int tegratab_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;
@@ -128,7 +128,7 @@ static int tegratab_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;
index 7cf6556..cb0e9a0 100644 (file)
@@ -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;
index 952abaa..7a2ed0c 100644 (file)
@@ -467,7 +467,7 @@ static int dsi_s_1080p_5_reg_get(void)
                return 0;
 
        vdd_lcd_s_1v8 = regulator_get(NULL, "vdd_lcd_1v8_s");
-       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;
@@ -475,7 +475,7 @@ static int dsi_s_1080p_5_reg_get(void)
        }
 
        vdd_sys_bl_3v7 = regulator_get(NULL, "vdd_sys_bl");
-       if (IS_ERR_OR_NULL(vdd_sys_bl_3v7)) {
+       if (IS_ERR(vdd_sys_bl_3v7)) {
                pr_err("vdd_sys_bl regulator get failed\n");
                err = PTR_ERR(vdd_sys_bl_3v7);
                vdd_sys_bl_3v7 = NULL;
index bf2d8ea..7639b03 100644 (file)
@@ -51,7 +51,7 @@ static int shield_edp_regulator_get(struct device *dev)
                return 0;
 
        vdd_ds_1v8 = regulator_get(dev, "vdd_ds_1v8");
-       if (IS_ERR_OR_NULL(vdd_ds_1v8)) {
+       if (IS_ERR(vdd_ds_1v8)) {
                pr_err("vdd_ds_1v8 regulator get failed\n");
                err = PTR_ERR(vdd_ds_1v8);
                vdd_ds_1v8 = NULL;
@@ -60,7 +60,7 @@ static int shield_edp_regulator_get(struct device *dev)
 
        /* backlight */
        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;
@@ -69,7 +69,7 @@ static int shield_edp_regulator_get(struct device *dev)
 
        /* lcd */
        avdd_lcd = regulator_get(dev, "avdd_lcd");
-       if (IS_ERR_OR_NULL(avdd_lcd)) {
+       if (IS_ERR(avdd_lcd)) {
                pr_err("avdd_lcd regulator get failed\n");
                err = PTR_ERR(avdd_lcd);
                avdd_lcd = NULL;
@@ -78,7 +78,7 @@ static int shield_edp_regulator_get(struct device *dev)
 
        /* LCD_RST */
        avdd_3v3_dp = regulator_get(dev, "avdd_3v3_dp");
-       if (IS_ERR_OR_NULL(avdd_3v3_dp)) {
+       if (IS_ERR(avdd_3v3_dp)) {
                pr_err("avdd_3v3_dp regulator get failed\n");
                err = PTR_ERR(avdd_3v3_dp);
                avdd_3v3_dp = NULL;
index a15064c..be7df9c 100644 (file)
@@ -51,7 +51,7 @@ static int shield_edp_regulator_get(struct device *dev)
                return 0;
 
        vdd_ds_1v8 = regulator_get(dev, "vdd_lcd_1v8_s");
-       if (IS_ERR_OR_NULL(vdd_ds_1v8)) {
+       if (IS_ERR(vdd_ds_1v8)) {
                pr_err("vdd_ds_1v8 regulator get failed\n");
                err = PTR_ERR(vdd_ds_1v8);
                vdd_ds_1v8 = NULL;
@@ -59,7 +59,7 @@ static int shield_edp_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;
@@ -67,7 +67,7 @@ static int shield_edp_regulator_get(struct device *dev)
        }
 
        avdd_lcd = regulator_get(dev, "avdd_lcd");
-       if (IS_ERR_OR_NULL(avdd_lcd)) {
+       if (IS_ERR(avdd_lcd)) {
                pr_err("avdd_lcd regulator get failed\n");
                err = PTR_ERR(avdd_lcd);
                avdd_lcd = NULL;
@@ -75,7 +75,7 @@ static int shield_edp_regulator_get(struct device *dev)
        }
 
        avdd_3v3_dp = regulator_get(dev, "avdd_3v3_dp");
-       if (IS_ERR_OR_NULL(avdd_3v3_dp)) {
+       if (IS_ERR(avdd_3v3_dp)) {
                pr_err("avdd_3v3_dp regulator get failed\n");
                err = PTR_ERR(avdd_3v3_dp);
                avdd_3v3_dp = NULL;
index 7b8b087..3d36dea 100644 (file)
@@ -191,14 +191,14 @@ static int dalmore_dsi_regulator_get(struct device *dev)
        if (reg_requested)
                return 0;
        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 regulator get failed\n");
                err = PTR_ERR(dvdd_lcd_1v8);
                dvdd_lcd_1v8 = NULL;
                goto fail;
        }
        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;
@@ -206,7 +206,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;
@@ -214,7 +214,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;
@@ -262,7 +262,7 @@ static int macallan_dsi_regulator_get(struct device *dev)
                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;
@@ -270,7 +270,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;
index 63fc1b0..b615a07 100644 (file)
@@ -1038,25 +1038,25 @@ static int tegra_bb_probe(struct platform_device *pdev)
        bb->sd = sysfs_get_dirent(pdev->dev.kobj.sd, NULL, "status");
 
        bb->vdd_bb_core = regulator_get(NULL, "vdd_bb");
-       if (IS_ERR_OR_NULL(bb->vdd_bb_core)) {
+       if (IS_ERR(bb->vdd_bb_core)) {
                pr_err("vdd_bb regulator get failed\n");
                bb->vdd_bb_core = NULL;
        }
 
        bb->vdd_bb_pll = regulator_get(NULL, "avdd_bb_pll");
-       if (IS_ERR_OR_NULL(bb->vdd_bb_pll)) {
+       if (IS_ERR(bb->vdd_bb_pll)) {
                pr_err("avdd_bb_pll regulator get failed\n");
                bb->vdd_bb_pll = NULL;
        }
 
        /* clk enable for mc_bbc / pll_p_bbc */
        c = tegra_get_clock_by_name("mc_bbc");
-       if (IS_ERR_OR_NULL(c))
+       if (IS_ERR(c))
                pr_err("mc_bbc get failed\n");
        else
                clk_enable(c);
        c = tegra_get_clock_by_name("pll_p_bbc");
-       if (IS_ERR_OR_NULL(c))
+       if (IS_ERR(c))
                pr_err("pll_p_bbc get failed\n");
        else
                clk_enable(c);