Skip to content

Commit

Permalink
i2c: fix platform_get_irq.cocci warnings
Browse files Browse the repository at this point in the history
[ Upstream commit 2478b9c ]

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>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Tian Tao authored and gregkh committed Sep 15, 2021
1 parent 187705a commit d36ab9b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/i2c/busses/i2c-hix5hd2.c
Expand Up @@ -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)) {
Expand Down

0 comments on commit d36ab9b

Please sign in to comment.