aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mv64xxx.c
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/i2c/busses/i2c-mv64xxx.c
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/i2c/busses/i2c-mv64xxx.c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 8b20ef8524ac..3bbd65d35a5e 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -701,9 +701,8 @@ static int
701mv64xxx_i2c_remove(struct platform_device *dev) 701mv64xxx_i2c_remove(struct platform_device *dev)
702{ 702{
703 struct mv64xxx_i2c_data *drv_data = platform_get_drvdata(dev); 703 struct mv64xxx_i2c_data *drv_data = platform_get_drvdata(dev);
704 int rc;
705 704
706 rc = i2c_del_adapter(&drv_data->adapter); 705 i2c_del_adapter(&drv_data->adapter);
707 free_irq(drv_data->irq, drv_data); 706 free_irq(drv_data->irq, drv_data);
708 mv64xxx_i2c_unmap_regs(drv_data); 707 mv64xxx_i2c_unmap_regs(drv_data);
709#if defined(CONFIG_HAVE_CLK) 708#if defined(CONFIG_HAVE_CLK)
@@ -715,7 +714,7 @@ mv64xxx_i2c_remove(struct platform_device *dev)
715#endif 714#endif
716 kfree(drv_data); 715 kfree(drv_data);
717 716
718 return rc; 717 return 0;
719} 718}
720 719
721static const struct of_device_id mv64xxx_i2c_of_match_table[] = { 720static const struct of_device_id mv64xxx_i2c_of_match_table[] = {