diff mbox series

thermal: da9062/61: fix platform_get_irq.cocci warnings

Message ID 1607912820-48593-1-git-send-email-tiantao6@hisilicon.com (mailing list archive)
State New, archived
Delegated to: Daniel Lezcano
Headers show
Series thermal: da9062/61: fix platform_get_irq.cocci warnings | expand

Commit Message

tiantao (H) Dec. 14, 2020, 2:27 a.m. UTC
Remove dev_err() messages after platform_get_irq*() failures.
Line 248 redundant because platform_get_irq() already prints
an error.

Generated by: scripts/coccinelle/api/platform_get_irq.cocci

Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
 drivers/thermal/da9062-thermal.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Adam Thomson Dec. 14, 2020, 10:03 a.m. UTC | #1
On 14 December 2020 02:27, Tian Tao wrote:

> Remove dev_err() messages after platform_get_irq*() failures.
> Line 248 redundant because platform_get_irq() already prints
> an error.
> 
> Generated by: scripts/coccinelle/api/platform_get_irq.cocci
> 
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>

I'm not sure stating line 248 is overly helpful in a commit message, especially
if this were to be cherry-picked (not that this is likely given the kind of
change being made).

That aside, the change itself is fine so:

Reviewed-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
diff mbox series

Patch

diff --git a/drivers/thermal/da9062-thermal.c b/drivers/thermal/da9062-thermal.c
index 4d74994..3009e6a 100644
--- a/drivers/thermal/da9062-thermal.c
+++ b/drivers/thermal/da9062-thermal.c
@@ -248,10 +248,9 @@  static int da9062_thermal_probe(struct platform_device *pdev)
 		thermal->zone->passive_delay);
 
 	ret = platform_get_irq_byname(pdev, "THERMAL");
-	if (ret < 0) {
-		dev_err(&pdev->dev, "Failed to get platform IRQ.\n");
+	if (ret < 0)
 		goto err_zone;
-	}
+
 	thermal->irq = ret;
 
 	ret = request_threaded_irq(thermal->irq, NULL,