aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-09 03:16:46 -0500
committerWolfram Sang <wsa@the-dreams.de>2013-04-02 01:06:03 -0400
commitbf51a8c5e0b6133b929eb7d7456e99a605f8168c (patch)
tree5b592f4c92618ae074af18afee0ff1ad269177d3 /drivers/media
parentf5fb0822957b914ab7022cc4bfe000ec3bc9c82c (diff)
i2c: Ignore return value of i2c_del_adapter()
i2c_del_adapter() always returns 0. So all checks testing whether it will be non zero will always evaluate to false and the conditional code is dead code. This patch updates all callers of i2c_del_mux_adapter() to ignore the return value and assume that it will always succeed (which it will). In a subsequent patch the return type of i2c_del_adapter() will be made void. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Ben Hutchings <bhutchings@solarflare.com> Reviewed-by: Jean Delvare <khali@linux-fr.org> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/bt8xx/bttv-input.c6
-rw-r--r--drivers/media/pci/mantis/mantis_i2c.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-input.c b/drivers/media/pci/bt8xx/bttv-input.c
index 04207a799055..f42d26d7ed78 100644
--- a/drivers/media/pci/bt8xx/bttv-input.c
+++ b/drivers/media/pci/bt8xx/bttv-input.c
@@ -413,10 +413,10 @@ void init_bttv_i2c_ir(struct bttv *btv)
413 413
414int fini_bttv_i2c(struct bttv *btv) 414int fini_bttv_i2c(struct bttv *btv)
415{ 415{
416 if (0 != btv->i2c_rc) 416 if (btv->i2c_rc == 0)
417 return 0; 417 i2c_del_adapter(&btv->c.i2c_adap);
418 418
419 return i2c_del_adapter(&btv->c.i2c_adap); 419 return 0;
420} 420}
421 421
422int bttv_input_init(struct bttv *btv) 422int bttv_input_init(struct bttv *btv)
diff --git a/drivers/media/pci/mantis/mantis_i2c.c b/drivers/media/pci/mantis/mantis_i2c.c
index 937fb9d50213..895ddba3c0fb 100644
--- a/drivers/media/pci/mantis/mantis_i2c.c
+++ b/drivers/media/pci/mantis/mantis_i2c.c
@@ -261,6 +261,8 @@ int mantis_i2c_exit(struct mantis_pci *mantis)
261 mmwrite((intmask & ~MANTIS_INT_I2CDONE), MANTIS_INT_MASK); 261 mmwrite((intmask & ~MANTIS_INT_I2CDONE), MANTIS_INT_MASK);
262 262
263 dprintk(MANTIS_DEBUG, 1, "Removing I2C adapter"); 263 dprintk(MANTIS_DEBUG, 1, "Removing I2C adapter");
264 return i2c_del_adapter(&mantis->adapter); 264 i2c_del_adapter(&mantis->adapter);
265
266 return 0;
265} 267}
266EXPORT_SYMBOL_GPL(mantis_i2c_exit); 268EXPORT_SYMBOL_GPL(mantis_i2c_exit);