]> Pileus Git - ~andy/linux/blobdiff - drivers/regulator/max14577.c
Merge remote-tracking branches 'spi/fix/ath79', 'spi/fix/atmel', 'spi/fix/coldfire...
[~andy/linux] / drivers / regulator / max14577.c
index b1078ba3f39381338f2691f7585961337cf536c1..e0619526708c88393069abf4411fa2ff9473e510 100644 (file)
@@ -166,12 +166,14 @@ static int max14577_regulator_dt_parse_pdata(struct platform_device *pdev)
 
        ret = of_regulator_match(&pdev->dev, np, max14577_regulator_matches,
                        MAX14577_REG_MAX);
-       if (ret < 0) {
+       if (ret < 0)
                dev_err(&pdev->dev, "Error parsing regulator init data: %d\n", ret);
-               return ret;
-       }
+       else
+               ret = 0;
 
-       return 0;
+       of_node_put(np);
+
+       return ret;
 }
 
 static inline struct regulator_init_data *match_init_data(int index)