aboutsummaryrefslogtreecommitdiff
path: root/drivers/i2c/busses/i2c-nforce2-s4985.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-08-11 10:44:13 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-11 10:44:13 -0700
commit29bb1bdb260cd504c6ec0f567cc0cba6a4cf40e7 (patch)
tree5091868c0aadabf85773a462ff5bd95cac28c434 /drivers/i2c/busses/i2c-nforce2-s4985.c
parent3f1ae223902834d81b54b5d333f9efca07ad656b (diff)
parent8ff69eebf5bf8a123a117b78412d5efb85765d8b (diff)
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: hwmon: (lm75) Drop legacy i2c driver i2c: correct some size_t printk formats i2c: Check for address business before creating clients i2c: Let users select algorithm drivers manually again i2c: Fix NULL pointer dereference in i2c_new_probed_device i2c: Fix oops on bus multiplexer driver loading
Diffstat (limited to 'drivers/i2c/busses/i2c-nforce2-s4985.c')
-rw-r--r--drivers/i2c/busses/i2c-nforce2-s4985.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-nforce2-s4985.c b/drivers/i2c/busses/i2c-nforce2-s4985.c
index d1a4cbcf2aa..29015eb9ca4 100644
--- a/drivers/i2c/busses/i2c-nforce2-s4985.c
+++ b/drivers/i2c/busses/i2c-nforce2-s4985.c
@@ -150,6 +150,9 @@ static int __init nforce2_s4985_init(void)
int i, error;
union i2c_smbus_data ioconfig;
+ if (!nforce2_smbus)
+ return -ENODEV;
+
/* Configure the PCA9556 multiplexer */
ioconfig.byte = 0x00; /* All I/O to output mode */
error = i2c_smbus_xfer(nforce2_smbus, 0x18, 0, I2C_SMBUS_WRITE, 0x03,
@@ -161,8 +164,6 @@ static int __init nforce2_s4985_init(void)
}
/* Unregister physical bus */
- if (!nforce2_smbus)
- return -ENODEV;
error = i2c_del_adapter(nforce2_smbus);
if (error) {
dev_err(&nforce2_smbus->dev, "Physical bus removal failed\n");