aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-i2c.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2009-05-23 15:57:31 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-05-23 15:57:31 -0400
commita2ab67fae1ab9226679495a8d260f4e6555efc5f (patch)
treef7de683c9c8ff0869a7e11f1d40802145d05f5b4 /drivers/media/video/cx18/cx18-i2c.c
parent6d0485a99366d4e0e7e725f14995c74cb7ca4499 (diff)
parent135cad366b4e7d6a79f6369f6cb5b721985aa62f (diff)
Merge branch 'for-rmk-devel' of git://git.pengutronix.de/git/imx/linux-2.6 into devel
Conflicts: arch/arm/Kconfig arch/arm/Makefile
Diffstat (limited to 'drivers/media/video/cx18/cx18-i2c.c')
-rw-r--r--drivers/media/video/cx18/cx18-i2c.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/media/video/cx18/cx18-i2c.c b/drivers/media/video/cx18/cx18-i2c.c
index b9b7064a2be8..8591e4fc359f 100644
--- a/drivers/media/video/cx18/cx18-i2c.c
+++ b/drivers/media/video/cx18/cx18-i2c.c
@@ -211,7 +211,7 @@ static struct i2c_algo_bit_data cx18_i2c_algo_template = {
211/* init + register i2c algo-bit adapter */ 211/* init + register i2c algo-bit adapter */
212int init_cx18_i2c(struct cx18 *cx) 212int init_cx18_i2c(struct cx18 *cx)
213{ 213{
214 int i; 214 int i, err;
215 CX18_DEBUG_I2C("i2c init\n"); 215 CX18_DEBUG_I2C("i2c init\n");
216 216
217 for (i = 0; i < 2; i++) { 217 for (i = 0; i < 2; i++) {
@@ -268,8 +268,18 @@ int init_cx18_i2c(struct cx18 *cx)
268 cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, 268 cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL,
269 core, reset, (u32) CX18_GPIO_RESET_I2C); 269 core, reset, (u32) CX18_GPIO_RESET_I2C);
270 270
271 return i2c_bit_add_bus(&cx->i2c_adap[0]) || 271 err = i2c_bit_add_bus(&cx->i2c_adap[0]);
272 i2c_bit_add_bus(&cx->i2c_adap[1]); 272 if (err)
273 goto err;
274 err = i2c_bit_add_bus(&cx->i2c_adap[1]);
275 if (err)
276 goto err_del_bus_0;
277 return 0;
278
279 err_del_bus_0:
280 i2c_del_adapter(&cx->i2c_adap[0]);
281 err:
282 return err;
273} 283}
274 284
275void exit_cx18_i2c(struct cx18 *cx) 285void exit_cx18_i2c(struct cx18 *cx)