diff options
author | Tian Tao <tiantao6@hisilicon.com> | 2021-03-25 20:04:32 +0800 |
---|---|---|
committer | Wolfram Sang <wsa@kernel.org> | 2021-03-31 09:58:19 +0200 |
commit | 8f66edb25c4e10f8380c88f4c097158ff611fd10 (patch) | |
tree | 5985e009478387932800edbd0e213de0eedd2a51 /drivers/i2c | |
parent | 1a0e240d09413ac6c90ce6247afdfc424c84103f (diff) | |
download | linux-8f66edb25c4e10f8380c88f4c097158ff611fd10.tar.bz2 |
i2c: stm32f7: Remove useless error message
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>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-stm32f7.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/i2c/busses/i2c-stm32f7.c b/drivers/i2c/busses/i2c-stm32f7.c index 162a3b069261..9fbcbd1807df 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) |