Message ID | 1608885606-1962-1-git-send-email-tiantao6@hisilicon.com |
---|---|
State | Accepted |
Commit | 2478b9c1dcc9aa84cfd71ed7b5ca2a2c0ede75b7 |
Headers | show |
Series | i2c: fix platform_get_irq.cocci warnings | expand |
On Fri, Dec 25, 2020 at 04:40:06PM +0800, Tian Tao wrote: > Remove dev_err() messages after platform_get_irq*() failures. > drivers/i2c/busses/i2c-hix5hd2.c:417:2-9: line 417 is redundant > because platform_get_irq() already prints an error > > Signed-off-by: Tian Tao <tiantao6@hisilicon.com> Applied to for-next, thanks!
diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c index ab15b1e..c45f226 100644 --- a/drivers/i2c/busses/i2c-hix5hd2.c +++ b/drivers/i2c/busses/i2c-hix5hd2.c @@ -413,10 +413,8 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev) return PTR_ERR(priv->regs); irq = platform_get_irq(pdev, 0); - if (irq <= 0) { - dev_err(&pdev->dev, "cannot find HS-I2C IRQ\n"); + if (irq <= 0) return irq; - } priv->clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(priv->clk)) {
Remove dev_err() messages after platform_get_irq*() failures. drivers/i2c/busses/i2c-hix5hd2.c:417:2-9: line 417 is redundant because platform_get_irq() already prints an error Signed-off-by: Tian Tao <tiantao6@hisilicon.com> --- drivers/i2c/busses/i2c-hix5hd2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)