All of lore.kernel.org
 help / color / mirror / Atom feed
From: greg@kroah.com (Greg KH)
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: [PATCH] i2c driver fixes for 2.6.4
Date: Thu, 19 May 2005 06:24:47 +0000	[thread overview]
Message-ID: <10793913932181@kroah.com> (raw)
In-Reply-To: <10793913931477@kroah.com>
In-Reply-To: <10793913903814@kroah.com>

ChangeSet 1.1608.74.3, 2004/03/09 14:58:25-08:00, rmk+lkml@arm.linux.org.uk

[PATCH] I2C: Fix i2c_use_client()

i2c_use_client() contains a bogosity.  If i2c_inc_use_client() returns
success, i2c_use_client() returns an error.  If i2c_inc_use_client()
fails, i2c_use_client() might succeed.

Fix it so that (a) we get the correct sense between these two functions,
and (b) propagate the error code from i2c_inc_use_client(), rather than
making our own one up.


 drivers/i2c/i2c-core.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c	Mon Mar 15 14:35:07 2004
+++ b/drivers/i2c/i2c-core.c	Mon Mar 15 14:35:07 2004
@@ -437,8 +437,11 @@
 
 int i2c_use_client(struct i2c_client *client)
 {
-	if (!i2c_inc_use_client(client))
-		return -ENODEV;
+	int ret;
+
+	ret = i2c_inc_use_client(client);
+	if (ret)
+		return ret;
 
 	if (client->flags & I2C_CLIENT_ALLOW_USE) {
 		if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE)


WARNING: multiple messages have this Message-ID (diff)
From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver fixes for 2.6.4
Date: Mon, 15 Mar 2004 14:56:33 -0800	[thread overview]
Message-ID: <10793913932181@kroah.com> (raw)
In-Reply-To: <10793913931477@kroah.com>

ChangeSet 1.1608.74.3, 2004/03/09 14:58:25-08:00, rmk+lkml@arm.linux.org.uk

[PATCH] I2C: Fix i2c_use_client()

i2c_use_client() contains a bogosity.  If i2c_inc_use_client() returns
success, i2c_use_client() returns an error.  If i2c_inc_use_client()
fails, i2c_use_client() might succeed.

Fix it so that (a) we get the correct sense between these two functions,
and (b) propagate the error code from i2c_inc_use_client(), rather than
making our own one up.


 drivers/i2c/i2c-core.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)


diff -Nru a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
--- a/drivers/i2c/i2c-core.c	Mon Mar 15 14:35:07 2004
+++ b/drivers/i2c/i2c-core.c	Mon Mar 15 14:35:07 2004
@@ -437,8 +437,11 @@
 
 int i2c_use_client(struct i2c_client *client)
 {
-	if (!i2c_inc_use_client(client))
-		return -ENODEV;
+	int ret;
+
+	ret = i2c_inc_use_client(client);
+	if (ret)
+		return ret;
 
 	if (client->flags & I2C_CLIENT_ALLOW_USE) {
 		if (client->flags & I2C_CLIENT_ALLOW_MULTIPLE_USE)


  parent reply	other threads:[~2005-05-19  6:24 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-15 22:48 [BK PATCH] i2c driver fixes for 2.6.4 Greg KH
2005-05-19  6:24 ` Greg KH
2004-03-15 22:56 ` [PATCH] " Greg KH
2005-05-19  6:24   ` Greg KH
2004-03-15 22:56   ` Greg KH
2005-05-19  6:24     ` Greg KH
2004-03-15 22:56     ` Greg KH
2005-05-19  6:24       ` Greg KH
2004-03-15 22:56       ` Greg KH
2004-03-15 22:56         ` Greg KH
2005-05-19  6:24           ` Greg KH
2004-03-15 22:56           ` Greg KH
2004-03-15 22:56             ` Greg KH
2005-05-19  6:24               ` Greg KH
2004-03-15 22:56               ` Greg KH
2005-05-19  6:24                 ` Greg KH
2004-03-15 22:56                 ` Greg KH
2005-05-19  6:24                   ` Greg KH
2004-03-15 22:56                   ` Greg KH
2004-03-15 22:56                     ` Greg KH
2005-05-19  6:24                       ` Greg KH
2004-03-15 22:56                       ` Greg KH
2005-05-19  6:24                         ` Greg KH
2004-03-15 22:56                         ` Greg KH
2005-05-19  6:24                           ` Greg KH
2004-03-15 22:56                           ` Greg KH
2005-05-19  6:24                             ` Greg KH
2004-03-15 22:56                             ` Greg KH
2005-05-19  6:24                               ` Greg KH
2004-03-15 22:56                               ` Greg KH
2005-05-19  6:24                                 ` Greg KH
2004-03-15 22:56                                 ` Greg KH
2005-05-19  6:24                                   ` Greg KH
2004-03-15 22:56                                   ` Greg KH
2005-05-19  6:24                                     ` Greg KH
2004-03-15 22:56                                     ` Greg KH
2005-05-19  6:24                                       ` Greg KH
2004-03-15 22:56                                       ` Greg KH
2005-05-19  6:24                                         ` Greg KH
2004-03-15 22:56                                         ` Greg KH
2005-05-19  6:24                                           ` Greg KH
2004-03-15 22:56                                           ` Greg KH
2005-05-19  6:24                                             ` Greg KH
2004-03-15 22:56                                             ` Greg KH
2005-05-19  6:24                                               ` Greg KH
2004-03-15 22:56                                               ` Greg KH
2005-05-19  6:24                                                 ` Greg KH
2004-03-15 22:56                                                 ` Greg KH
2005-05-19  6:24                                                   ` Greg KH
2004-03-15 22:56                                                   ` Greg KH [this message]
2005-05-19  6:24                                                     ` Greg KH
2004-03-15 22:56                                                     ` Greg KH
2005-05-19  6:24                                                       ` Greg KH
2004-03-15 22:56                                                       ` Greg KH
2005-05-19  6:24                                                         ` Greg KH
2004-03-15 22:56                                                         ` Greg KH
2005-05-19  6:24                                                           ` Greg KH
2004-03-15 22:56                                                           ` Greg KH
2005-05-19  6:24                                                             ` Greg KH
2004-03-15 22:56                                                             ` Greg KH
2005-05-19  6:24                                                               ` Greg KH
2004-03-15 22:56                                                               ` Greg KH
2005-05-19  6:24                                                                 ` Greg KH
2004-03-15 22:56                                                                 ` Greg KH
2005-05-19  6:24                                                                   ` Greg KH
2004-03-15 22:56                                                                   ` Greg KH
2005-05-19  6:24                                                                     ` Greg KH
2004-03-15 22:56                                                                     ` Greg KH
2005-05-19  6:24                                                                       ` Greg KH
2004-03-15 22:56                                                                       ` Greg KH
2005-05-19  6:24                                                                         ` Greg KH
2004-03-15 22:56                                                                         ` Greg KH
2005-05-19  6:24                                                                           ` Greg KH
2004-03-15 22:56                                                                           ` Greg KH
2005-05-19  6:24                                                                             ` Greg KH
2004-03-15 22:56                                                                             ` Greg KH
2005-05-19  6:24                                                                               ` Greg KH
2004-03-15 22:56                                                                               ` Greg KH
2004-03-15 22:56                                                                                 ` Greg KH
2004-03-15 22:56                                                                                   ` Greg KH

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=10793913932181@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sensors@stimpy.netroedge.com \
    /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.