Skip to contentSkip to conversation

staging: media: Remove surplus dev_err() when using platform_get_irq()

PATCH In review Yang Li 3 participants 3 messages Nov 29, 2022 – Dec 8, 2022

Subsystems (4)
lore
Share & tools
lore

Yang Li

author
#0 lore raw

PATCH 1/1 staging: 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/staging/media/sunxi/sun6i-isp/sun6i_isp.c:390:2-9: line 390 is redundant because platform_get_irq() already prints an error

---
 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c +0 -1
index 7b7947509b69..a6e813ff413a 100644
@@ -387,7 +387,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev,
 
 	irq = platform_get_irq(platform_dev, 0);
 	if (irq < 0) {
-		dev_err(dev, "failed to get interrupt\n");
 		ret = -ENXIO;
 		goto error_clock_rate_exclusive;
 	}
Signature · 1 line
2.20.1.7.g153144c
maintainer Acked-by on v1 1/1
#1 lore raw

Dne torek, 29. november 2022 ob 02:29:23 CET je Yang Li napisal(a):

Quoted 11 lines

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/staging/media/sunxi/sun6i-isp/sun6i_isp.c:390:2-9: line 390 is redundant because platform_get_irq() already prints an error

Best regards,
Jernej

Acked-by on v1 1/1
#2 lore raw
In reply to Yang Li

Hi,

Quoted 10 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/staging/media/sunxi/sun6i-isp/sun6i_isp.c:390:2-9: line 390 is redundant because platform_get_irq() already prints an error

Thanks for the fix!

Paul

Quoted 19 lines
---
 drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c | 1 -
 1 file changed, 1 deletion(-)
drivers/staging/media/sunxi/sun6i-isp/sun6i_isp.c +0 -1
index 7b7947509b69..a6e813ff413a 100644
@@ -387,7 +387,6 @@ static int sun6i_isp_resources_setup(struct sun6i_isp_device *isp_dev,
 
 	irq = platform_get_irq(platform_dev, 0);
 	if (irq < 0) {
-		dev_err(dev, "failed to get interrupt\n");
 		ret = -ENXIO;
 		goto error_clock_rate_exclusive;
 	}
Signature · 1 line
2.20.1.7.g153144c
Signature · 3 lines
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com