]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'regulator/topic/tps6586x' into v3.9-rc8
authorMark Brown <broonie@sirena.org.uk>
Sun, 28 Apr 2013 01:13:48 +0000 (02:13 +0100)
committerMark Brown <broonie@sirena.org.uk>
Sun, 28 Apr 2013 01:13:48 +0000 (02:13 +0100)
drivers/regulator/tps6586x-regulator.c

index ac8a6cb62090fbe025a06475cf14070935bd6501..d8fa37d5c7342bee03a7e6bce2794a8669342f9e 100644 (file)
@@ -246,7 +246,7 @@ static int tps6586x_regulator_set_slew_rate(struct platform_device *pdev,
                reg = TPS6586X_SM1SL;
                break;
        default:
-               dev_warn(&pdev->dev, "Only SM0/SM1 can set slew rate\n");
+               dev_err(&pdev->dev, "Only SM0/SM1 can set slew rate\n");
                return -EINVAL;
        }
 
@@ -305,14 +305,12 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
        }
 
        err = of_regulator_match(&pdev->dev, regs, tps6586x_matches, num);
+       of_node_put(regs);
        if (err < 0) {
                dev_err(&pdev->dev, "Regulator match failed, e %d\n", err);
-               of_node_put(regs);
                return NULL;
        }
 
-       of_node_put(regs);
-
        pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
        if (!pdata) {
                dev_err(&pdev->dev, "Memory alloction failed\n");