summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-03-12 13:07:12 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-12 13:07:12 -0700
commit123d43acd2e55cd7db792d17c7e906db42cada42 (patch)
tree704c222d21fcc9954742f3e3b05ec8e22fe35c01 /drivers/i2c/i2c-core.c
parent299601cfc0aabbabf82fca50652b7290cce7eb00 (diff)
parent3d706d952cf238a60c5571e33329448b453a2ab9 (diff)
downloadtalos-op-linux-123d43acd2e55cd7db792d17c7e906db42cada42.tar.gz
talos-op-linux-123d43acd2e55cd7db792d17c7e906db42cada42.zip
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6: i2c: chips subdirectory is deprecated i2c: Keep client->driver and client->dev.driver in sync i2c-amd756: Fix off-by-one
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 96da22e9a5a4..fd84b2a36338 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -90,12 +90,16 @@ static int i2c_device_probe(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct i2c_driver *driver = to_i2c_driver(dev->driver);
+ int status;
if (!driver->probe)
return -ENODEV;
client->driver = driver;
dev_dbg(dev, "probe\n");
- return driver->probe(client);
+ status = driver->probe(client);
+ if (status)
+ client->driver = NULL;
+ return status;
}
static int i2c_device_remove(struct device *dev)
OpenPOWER on IntegriCloud