@@ -765,7 +765,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
irq = platform_get_irq(pdev, 0);
if (irq < 0)
- return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n");
+ return irq;
dev = devm_kzalloc(&pdev->dev, sizeof(*dev), GFP_KERNEL);
if (!dev)
@@ -378,9 +378,8 @@ static int mchp_corei2c_probe(struct platform_device *pdev)
return PTR_ERR(idev->base);
irq = platform_get_irq(pdev, 0);
- if (irq <= 0)
- return dev_err_probe(&pdev->dev, -ENXIO,
- "invalid IRQ %d for I2C controller\n", irq);
+ if (irq < 0)
+ return irq;
idev->i2c_clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(idev->i2c_clk))
When platform_get_irq() is called, the error message has been printed, so it need not to call dev_err_probe() to print error, and platform_get_irq() never returned zero. Signed-off-by: Zhu Wang <wangzhu9@huawei.com> --- drivers/i2c/busses/i2c-davinci.c | 2 +- drivers/i2c/busses/i2c-microchip-corei2c.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)