From: Ben Dooks <ben-linux@fluff.org>
To: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe()
Date: Tue, 31 Oct 2017 14:36:50 +0000 [thread overview]
Message-ID: <20171031143650.GA13049@trinity.fluff.org> (raw)
In-Reply-To: <20171025132620.l7scp2eachnarpzt@mwanda>
On Wed, Oct 25, 2017 at 04:26:20PM +0300, Dan Carpenter wrote:
> > @@ -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
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.
WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben-linux@fluff.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-samsung-soc@vger.kernel.org,
Wolfram Sang <wsa@the-dreams.de>,
kernel-janitors@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Kukjin Kim <kgene@kernel.org>,
linux-i2c@vger.kernel.org, Ben Dooks <ben-linux@fluff.org>,
SF Markus Elfring <elfring@users.sourceforge.net>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe()
Date: Tue, 31 Oct 2017 14:36:50 +0000 [thread overview]
Message-ID: <20171031143650.GA13049@trinity.fluff.org> (raw)
In-Reply-To: <20171025132620.l7scp2eachnarpzt@mwanda>
On Wed, Oct 25, 2017 at 04:26:20PM +0300, Dan Carpenter wrote:
> > @@ -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
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.
WARNING: multiple messages have this Message-ID (diff)
From: ben-linux@fluff.org (Ben Dooks)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe()
Date: Tue, 31 Oct 2017 14:36:50 +0000 [thread overview]
Message-ID: <20171031143650.GA13049@trinity.fluff.org> (raw)
In-Reply-To: <20171025132620.l7scp2eachnarpzt@mwanda>
On Wed, Oct 25, 2017 at 04:26:20PM +0300, Dan Carpenter wrote:
> > @@ -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
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.
WARNING: multiple messages have this Message-ID (diff)
From: Ben Dooks <ben-linux@fluff.org>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: SF Markus Elfring <elfring@users.sourceforge.net>,
Ben Dooks <ben-linux@fluff.org>,
linux-arm-kernel@lists.infradead.org, linux-i2c@vger.kernel.org,
linux-samsung-soc@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>,
Kukjin Kim <kgene@kernel.org>, Wolfram Sang <wsa@the-dreams.de>,
LKML <linux-kernel@vger.kernel.org>,
kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] I2C-S3C2410: Use common error handling code in s3c24xx_i2c_probe()
Date: Tue, 31 Oct 2017 14:36:50 +0000 [thread overview]
Message-ID: <20171031143650.GA13049@trinity.fluff.org> (raw)
In-Reply-To: <20171025132620.l7scp2eachnarpzt@mwanda>
On Wed, Oct 25, 2017 at 04:26:20PM +0300, Dan Carpenter wrote:
> > @@ -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
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.
next prev parent reply other threads:[~2017-10-31 14:36 UTC|newest]
Thread overview: 12+ 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:05 ` SF Markus Elfring
2017-10-25 13:05 ` SF Markus Elfring
2017-10-25 13:05 ` SF Markus Elfring
2017-10-25 13:26 ` Dan Carpenter
2017-10-25 13:26 ` Dan Carpenter
2017-10-25 13:26 ` Dan Carpenter
2017-10-25 13:26 ` Dan Carpenter
2017-10-31 14:36 ` Ben Dooks [this message]
2017-10-31 14:36 ` Ben Dooks
2017-10-31 14:36 ` Ben Dooks
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=20171031143650.GA13049@trinity.fluff.org \
--to=ben-linux@fluff.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.