lkml.org 
[lkml]   [2022]   [Dec]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH linux-next] pxa: Remove dev_err() after platform_get_irq()
Date

<zhang.songyi@zte.com.cn> writes:

> From: zhang songyi <zhang.songyi@zte.com.cn>
>
> 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/soc/pxa/ssp.c:150:2-9: line 150 is redundant because
> platform_get_irq() already prints an error
>
> Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
> ---
> drivers/soc/pxa/ssp.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/soc/pxa/ssp.c b/drivers/soc/pxa/ssp.c
> index 93449fb3519e..7085901b4e4b 100644
> --- a/drivers/soc/pxa/ssp.c
> +++ b/drivers/soc/pxa/ssp.c
> @@ -147,7 +147,6 @@ static int pxa_ssp_probe(struct
> platform_device *pdev)
>
> ssp->irq = platform_get_irq(pdev, 0);
> if (ssp->irq < 0) {
> - dev_err(dev, "no IRQ resource defined\n");
> return -ENODEV;
> }
As you're leaving only one statement in the if, you should drop
the braces as well.

Other than that, it looks good :
Reviewed-by: Robert Jarzmik <robert.jarzmik@free.fr>

Cheers.

--
Robert

\
 
 \ /
  Last update: 2022-12-01 19:18    [W:0.087 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site