public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: dan.carpenter@oracle.com (Dan Carpenter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe()
Date: Wed, 25 Oct 2017 16:26:20 +0300	[thread overview]
Message-ID: <20171025132620.l7scp2eachnarpzt@mwanda> (raw)
In-Reply-To: <32c82282-ee0a-137f-4913-310b194b60f3@users.sourceforge.net>

> @@ -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

  reply	other threads:[~2017-10-25 13:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-25 13:05 [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe() SF Markus Elfring
2017-10-25 13:26 ` Dan Carpenter [this message]
2017-10-31 14:36   ` Ben Dooks

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171025132620.l7scp2eachnarpzt@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox