Skip to content

Commit 74605d6

Browse files
Dan Carpentergregkh
authored andcommitted
regulator: tps65219: regulator: tps65219: Fix error codes in probe()
[ Upstream commit 11cd7a5 ] There is a copy and paste error and we accidentally use "PTR_ERR(rdev)" instead of "error". The "rdev" pointer is valid at this point. Also there is no need to print the error code in the error message because dev_err_probe() already prints that. So clean up the error message a bit. Fixes: 38c9f98 ("regulator: tps65219: Add support for TPS65215 Regulator IRQs") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aKRGmVdbvT1HBvm8@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent d5b6f0c commit 74605d6

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

drivers/regulator/tps65219-regulator.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -454,9 +454,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
454454
irq_type->irq_name,
455455
irq_data);
456456
if (error)
457-
return dev_err_probe(tps->dev, PTR_ERR(rdev),
458-
"Failed to request %s IRQ %d: %d\n",
459-
irq_type->irq_name, irq, error);
457+
return dev_err_probe(tps->dev, error,
458+
"Failed to request %s IRQ %d\n",
459+
irq_type->irq_name, irq);
460460
}
461461

462462
for (i = 0; i < pmic->dev_irq_size; ++i) {
@@ -477,9 +477,9 @@ static int tps65219_regulator_probe(struct platform_device *pdev)
477477
irq_type->irq_name,
478478
irq_data);
479479
if (error)
480-
return dev_err_probe(tps->dev, PTR_ERR(rdev),
481-
"Failed to request %s IRQ %d: %d\n",
482-
irq_type->irq_name, irq, error);
480+
return dev_err_probe(tps->dev, error,
481+
"Failed to request %s IRQ %d\n",
482+
irq_type->irq_name, irq);
483483
}
484484

485485
return 0;

0 commit comments

Comments
 (0)