]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
i2c: stm32f7: Remove useless error message
authorTian Tao <tiantao6@hisilicon.com>
Thu, 25 Mar 2021 12:04:32 +0000 (20:04 +0800)
committerWolfram Sang <wsa@kernel.org>
Wed, 31 Mar 2021 07:58:19 +0000 (09:58 +0200)
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@hisilicon.com>
Signed-off-by: Zihao Tang <tangzihao1@hisilicon.com>
Reviewed-by: Alain Volmat <alain.volmat@foss.st.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-stm32f7.c

index 162a3b069261f95e79dd7e0fb78c68a2254a812d..9fbcbd1807df02d469a56b5d713999ce53170df3 100644 (file)
@@ -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)