Skip to contentSkip to conversation

media: chips-media: Remove surplus dev_err() when using platform_get_irq()

PATCH In review Yang Li 2 participants 2 messages Nov 27, 2023 – Nov 30, 2023

Subsystems (2)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 media: chips-media: Remove surplus dev_err() when using platform_get_irq()

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

---
 drivers/media/platform/chips-media/wave5/wave5-vpu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/media/platform/chips-media/wave5/wave5-vpu.c +0 -1
index bfe4caa79cc9..3f7c622e8d58 100644
@@ -209,7 +209,6 @@ static int wave5_vpu_probe(struct platform_device *pdev)
 
 	dev->irq = platform_get_irq(pdev, 0);
 	if (dev->irq < 0) {
-		dev_err(&pdev->dev, "failed to get irq resource\n");
 		ret = -ENXIO;
 		goto err_enc_unreg;
 	}
Signature · 1 line
2.20.1.7.g153144c
#1 lore raw

Hey Yang,

Thanks for the patch!

The commit subject line should point to the respective driver and you can drop the brackets, so:
media: chips-media: wave5: Remove surplus dev_err when using platform_get_irq

Greetings,
Sebastian

Quoted 28 lines · Yang Li

There is no need to call the dev_err() function directly to print a custom message when handling an error from either the platform_get_irq() or platform_get_irq_byname() functions as both are going to display an appropriate error message in case of a failure.

---
drivers/media/platform/chips-media/wave5/wave5-vpu.c | 1 -

1 file changed, 1 deletion(-)
drivers/media/platform/chips-media/wave5/wave5-vpu.c +0 -1
index bfe4caa79cc9..3f7c622e8d58 100644
@@ -209,7 +209,6 @@ static int wave5_vpu_probe(struct platform_device *pdev)
 
 	dev->irq = platform_get_irq(pdev, 0);
 	if (dev->irq < 0) {
-		dev_err(&pdev->dev, "failed to get irq resource\n");
 		ret = -ENXIO;
 		goto err_enc_unreg;
 	}
Signature · 1 line
2.20.1.7.g153144c