summaryrefslogtreecommitdiffstats
path: root/drivers/i2c/algos/i2c-algo-bit.c
diff options
context:
space:
mode:
authorMark M. Hoffman <mhoffman@lightlink.com>2006-07-01 17:16:06 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-07-13 00:43:07 +0200
commitb39ad0cf7c19fc14e8f823b1b36245f7a3711655 (patch)
treef30e4dcfb21bc6aae1dc8300cef28b912339d72c /drivers/i2c/algos/i2c-algo-bit.c
parent[PATCH] i2c: New mailing list (diff)
downloadlinux-b39ad0cf7c19fc14e8f823b1b36245f7a3711655.tar.xz
linux-b39ad0cf7c19fc14e8f823b1b36245f7a3711655.zip
[PATCH] i2c: Handle i2c_add_adapter failure in i2c algorithm drivers
Content-Disposition: inline; filename=i2c-algo-error-handling-fix.patch It is possible for i2c_add_adapter() to fail. Several I2C algorithm drivers ignore that fact. This (compile-tested only) patch fixes them. Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/algos/i2c-algo-bit.c')
-rw-r--r--drivers/i2c/algos/i2c-algo-bit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/algos/i2c-algo-bit.c b/drivers/i2c/algos/i2c-algo-bit.c
index df05df1a0ef6..3d6fc82c2cfc 100644
--- a/drivers/i2c/algos/i2c-algo-bit.c
+++ b/drivers/i2c/algos/i2c-algo-bit.c
@@ -544,8 +544,7 @@ int i2c_bit_add_bus(struct i2c_adapter *adap)
adap->timeout = 100; /* default values, should */
adap->retries = 3; /* be replaced by defines */
- i2c_add_adapter(adap);
- return 0;
+ return i2c_add_adapter(adap);
}