diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-04-30 21:12:13 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-04-30 21:16:49 +0200 |
commit | 3c56999eec7acc105a31b4546c94aad2fb844b13 (patch) | |
tree | 293aef41f1441875323541cbc4f790c291b83679 /drivers/media/video/cx18/cx18-i2c.c | |
parent | bad760089c1ef7fe525c0f268a4078b9cb483903 (diff) | |
parent | 12d161147f828192b5bcc33166f468a827832767 (diff) | |
download | lwn-3c56999eec7acc105a31b4546c94aad2fb844b13.tar.gz lwn-3c56999eec7acc105a31b4546c94aad2fb844b13.zip |
Merge branch 'core/signal' into perfcounters/core
This is necessary to avoid the conflict of syscall numbers.
Conflicts:
arch/x86/ia32/ia32entry.S
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
Fixes up the borked syscall numbers of perfcounters versus
preadv/pwritev as well.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/media/video/cx18/cx18-i2c.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-i2c.c | 16 |
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 = { /* init + register i2c algo-bit adapter */ int init_cx18_i2c(struct cx18 *cx) { - int i; + int i, err; CX18_DEBUG_I2C("i2c init\n"); for (i = 0; i < 2; i++) { @@ -268,8 +268,18 @@ int init_cx18_i2c(struct cx18 *cx) cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL, core, reset, (u32) CX18_GPIO_RESET_I2C); - return i2c_bit_add_bus(&cx->i2c_adap[0]) || - i2c_bit_add_bus(&cx->i2c_adap[1]); + err = i2c_bit_add_bus(&cx->i2c_adap[0]); + if (err) + goto err; + err = i2c_bit_add_bus(&cx->i2c_adap[1]); + if (err) + goto err_del_bus_0; + return 0; + + err_del_bus_0: + i2c_del_adapter(&cx->i2c_adap[0]); + err: + return err; } void exit_cx18_i2c(struct cx18 *cx) |