Re: [PATCH] i2c: stm32f7: Remove useless error message

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Thanks for the patch.

Reviewed-by: Alain Volmat <alain.volmat@xxxxxxxxxxx>

Alain

On Thu, Mar 25, 2021 at 08:04:32PM +0800, Tian Tao wrote:
> Fix the following coccicheck report:
> 
> drivers/i2c/busses/i2c-stm32f7.c:2032:3-10 : platform_get_irq :
> line 2032 is redundant because platform_get_irq() already prints an error
> 
> Remove dev_err() messages after platform_get_irq() failures.
> 
> Signed-off-by: Tian Tao <tiantao6@xxxxxxxxxxxxx>
> Signed-off-by: Zihao Tang <tangzihao1@xxxxxxxxxxxxx>
> ---
>  drivers/i2c/busses/i2c-stm32f7.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c
> index 162a3b0..9fbcbd1 100644
> --- a/drivers/i2c/busses/i2c-stm32f7.c
> +++ b/drivers/i2c/busses/i2c-stm32f7.c
> @@ -2035,12 +2035,8 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
>  	phy_addr = (dma_addr_t)res->start;
>  
>  	irq_event = platform_get_irq(pdev, 0);
> -	if (irq_event <= 0) {
> -		if (irq_event != -EPROBE_DEFER)
> -			dev_err(&pdev->dev, "Failed to get IRQ event: %d\n",
> -				irq_event);
> +	if (irq_event <= 0)
>  		return irq_event ? : -ENOENT;
> -	}
>  
>  	irq_error = platform_get_irq(pdev, 1);
>  	if (irq_error <= 0)
> -- 
> 2.7.4
> 



[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux