diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-09 03:16:46 -0500 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-04-02 01:06:03 -0400 |
commit | bf51a8c5e0b6133b929eb7d7456e99a605f8168c (patch) | |
tree | 5b592f4c92618ae074af18afee0ff1ad269177d3 /drivers/i2c/busses/i2c-viperboard.c | |
parent | f5fb0822957b914ab7022cc4bfe000ec3bc9c82c (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-viperboard.c')
-rw-r--r-- | drivers/i2c/busses/i2c-viperboard.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/i2c/busses/i2c-viperboard.c b/drivers/i2c/busses/i2c-viperboard.c index f45c32c1ace6..c68450cd8d5f 100644 --- a/drivers/i2c/busses/i2c-viperboard.c +++ b/drivers/i2c/busses/i2c-viperboard.c | |||
@@ -421,11 +421,10 @@ error: | |||
421 | static int vprbrd_i2c_remove(struct platform_device *pdev) | 421 | static int vprbrd_i2c_remove(struct platform_device *pdev) |
422 | { | 422 | { |
423 | struct vprbrd_i2c *vb_i2c = platform_get_drvdata(pdev); | 423 | struct vprbrd_i2c *vb_i2c = platform_get_drvdata(pdev); |
424 | int ret; | ||
425 | 424 | ||
426 | ret = i2c_del_adapter(&vb_i2c->i2c); | 425 | i2c_del_adapter(&vb_i2c->i2c); |
427 | 426 | ||
428 | return ret; | 427 | return 0; |
429 | } | 428 | } |
430 | 429 | ||
431 | static struct platform_driver vprbrd_i2c_driver = { | 430 | static struct platform_driver vprbrd_i2c_driver = { |