Thread (3 messages) 3 messages, 3 authors, 2017-10-31

[PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe()

From: ben-linux@fluff.org (Ben Dooks)
Date: 2017-10-31 15:01:51
Also in: kernel-janitors, linux-i2c, linux-samsung-soc, lkml

On Wed, Oct 25, 2017 at 04:26:20PM +0300, Dan Carpenter wrote:
quoted
@@ -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.").
quoted
 			dev_err(&pdev->dev, "cannot find IRQ\n");
-			clk_unprepare(i2c->clk);
-			return ret;
regards,
dan carpenter
I believe (ret < 0) { } should be the correct case here.

-- 
Ben Dooks, ben@fluff.org, http://www.fluff.org/ben/

Large Hadron Colada: A large Pina Colada that makes the universe disappear.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help