linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH -next] media: jpeg-core: Remove redundant dev_err()
  2023-07-27 10:06 [PATCH -next] media: jpeg-core: Remove redundant dev_err() Ruan Jinjie
@ 2023-07-27  8:47 ` Andrzej Pietrasiewicz
  0 siblings, 0 replies; 2+ messages in thread
From: Andrzej Pietrasiewicz @ 2023-07-27  8:47 UTC (permalink / raw)
  To: Ruan Jinjie, jacek.anaszewski, s.nawrocki, mchehab,
	linux-arm-kernel, linux-media, linux-kernel

Thanks!

W dniu 27.07.2023 o 12:06, Ruan Jinjie pisze:
> There is no need to call the dev_err() function directly to print a custom
> message when handling an error from platform_get_irq() function as
> it is going to display an appropriate error message in case of a failure.
> 
> Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>

Acked-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>

> ---
>   drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samThsung/s5p-jpeg/jpeg-core.c
> index 5e819b8b38a4..d2c4a0178b3c 100644
> --- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> +++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
> @@ -2870,10 +2870,8 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
>   
>   	/* interrupt service routine registration */
>   	jpeg->irq = ret = platform_get_irq(pdev, 0);
> -	if (ret < 0) {
> -		dev_err(&pdev->dev, "cannot find IRQ\n");
> +	if (ret < 0)
>   		return ret;
> -	}
>   
>   	ret = devm_request_irq(&pdev->dev, jpeg->irq, jpeg->variant->jpeg_irq,
>   				0, dev_name(&pdev->dev), jpeg);

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH -next] media: jpeg-core: Remove redundant dev_err()
@ 2023-07-27 10:06 Ruan Jinjie
  2023-07-27  8:47 ` Andrzej Pietrasiewicz
  0 siblings, 1 reply; 2+ messages in thread
From: Ruan Jinjie @ 2023-07-27 10:06 UTC (permalink / raw)
  To: andrzejtp2010, jacek.anaszewski, s.nawrocki, mchehab,
	linux-arm-kernel, linux-media, linux-kernel
  Cc: ruanjinjie

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

Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com>
---
 drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
index 5e819b8b38a4..d2c4a0178b3c 100644
--- a/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
+++ b/drivers/media/platform/samsung/s5p-jpeg/jpeg-core.c
@@ -2870,10 +2870,8 @@ static int s5p_jpeg_probe(struct platform_device *pdev)
 
 	/* interrupt service routine registration */
 	jpeg->irq = ret = platform_get_irq(pdev, 0);
-	if (ret < 0) {
-		dev_err(&pdev->dev, "cannot find IRQ\n");
+	if (ret < 0)
 		return ret;
-	}
 
 	ret = devm_request_irq(&pdev->dev, jpeg->irq, jpeg->variant->jpeg_irq,
 				0, dev_name(&pdev->dev), jpeg);
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-27  9:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-27 10:06 [PATCH -next] media: jpeg-core: Remove redundant dev_err() Ruan Jinjie
2023-07-27  8:47 ` Andrzej Pietrasiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).