]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-tegra/board-harmony-pcie.c
Merge branch 'queue' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target...
[karo-tx-linux.git] / arch / arm / mach-tegra / board-harmony-pcie.c
index 3cdc1bb8254c6764c453fb978f748aae6d8f526a..035b240b9e1502dba8b6c88240c00359bb7aa605 100644 (file)
@@ -56,13 +56,17 @@ int __init harmony_pcie_init(void)
        gpio_direction_output(en_vdd_1v05, 1);
 
        regulator = regulator_get(NULL, "vdd_ldo0,vddio_pex_clk");
-       if (IS_ERR_OR_NULL(regulator)) {
-               pr_err("%s: regulator_get failed: %d\n", __func__,
-                      (int)PTR_ERR(regulator));
+       if (IS_ERR(regulator)) {
+               err = PTR_ERR(regulator);
+               pr_err("%s: regulator_get failed: %d\n", __func__, err);
                goto err_reg;
        }
 
-       regulator_enable(regulator);
+       err = regulator_enable(regulator);
+       if (err) {
+               pr_err("%s: regulator_enable failed: %d\n", __func__, err);
+               goto err_en;
+       }
 
        err = tegra_pcie_init(true, true);
        if (err) {
@@ -74,6 +78,7 @@ int __init harmony_pcie_init(void)
 
 err_pcie:
        regulator_disable(regulator);
+err_en:
        regulator_put(regulator);
 err_reg:
        gpio_free(en_vdd_1v05);