# Re: \[PATCH\] I2C-S3C2410: Use common error handling code in s3c24xx\_i2c\_probe()

- From: Dan Carpenter \<hidden\>
- Date: 2017-10-25 13:27:31 
- List: linux-i2c
- Page: https://ratatoskr.run/linux-i2c/2017/10/5117914
- Thread: https://ratatoskr.run/linux-arm-kernel/2017/10/5117900/t.md

```text
> @@ -1180,24 +1179,21 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
>  		i2c->irq = ret = platform_get_irq(pdev, 0);
>  		if (ret <= 0) {

Not related to this patch, but the comparison here should be < 0.  Or
otherwise we should set an error code.  The bug was introduced in commit
e0d1ec97853f ("i2c-s3c2410: Change IRQ to be plain integer.").

>  			dev_err(&pdev->dev, "cannot find IRQ\n");
> -			clk_unprepare(i2c->clk);
> -			return ret;

regards,
dan carpenter
```
