aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/tps6586x-regulator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c
index ac8a6cb62090..d8fa37d5c734 100644
--- a/drivers/regulator/tps6586x-regulator.c
+++ b/drivers/regulator/tps6586x-regulator.c
@@ -246,7 +246,7 @@ static int tps6586x_regulator_set_slew_rate(struct platform_device *pdev,
246 reg = TPS6586X_SM1SL; 246 reg = TPS6586X_SM1SL;
247 break; 247 break;
248 default: 248 default:
249 dev_warn(&pdev->dev, "Only SM0/SM1 can set slew rate\n"); 249 dev_err(&pdev->dev, "Only SM0/SM1 can set slew rate\n");
250 return -EINVAL; 250 return -EINVAL;
251 } 251 }
252 252
@@ -305,14 +305,12 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt(
305 } 305 }
306 306
307 err = of_regulator_match(&pdev->dev, regs, tps6586x_matches, num); 307 err = of_regulator_match(&pdev->dev, regs, tps6586x_matches, num);
308 of_node_put(regs);
308 if (err < 0) { 309 if (err < 0) {
309 dev_err(&pdev->dev, "Regulator match failed, e %d\n", err); 310 dev_err(&pdev->dev, "Regulator match failed, e %d\n", err);
310 of_node_put(regs);
311 return NULL; 311 return NULL;
312 } 312 }
313 313
314 of_node_put(regs);
315
316 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); 314 pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
317 if (!pdata) { 315 if (!pdata) {
318 dev_err(&pdev->dev, "Memory alloction failed\n"); 316 dev_err(&pdev->dev, "Memory alloction failed\n");