summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2013-03-09 08:16:46 +0000
committerWolfram Sang <wsa@the-dreams.de>2013-04-02 07:06:03 +0200
commitbf51a8c5e0b6133b929eb7d7456e99a605f8168c (patch)
tree5b592f4c92618ae074af18afee0ff1ad269177d3 /drivers/staging/media
parentf5fb0822957b914ab7022cc4bfe000ec3bc9c82c (diff)
downloadtalos-obmc-linux-bf51a8c5e0b6133b929eb7d7456e99a605f8168c.tar.gz
talos-obmc-linux-bf51a8c5e0b6133b929eb7d7456e99a605f8168c.zip
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/staging/media')
-rw-r--r--drivers/staging/media/go7007/go7007-driver.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c
index 66950916df23..6f83c52a0b52 100644
--- a/drivers/staging/media/go7007/go7007-driver.c
+++ b/drivers/staging/media/go7007/go7007-driver.c
@@ -647,11 +647,8 @@ EXPORT_SYMBOL(go7007_alloc);
void go7007_remove(struct go7007 *go)
{
if (go->i2c_adapter_online) {
- if (i2c_del_adapter(&go->i2c_adapter) == 0)
- go->i2c_adapter_online = 0;
- else
- v4l2_err(&go->v4l2_dev,
- "error removing I2C adapter!\n");
+ i2c_del_adapter(&go->i2c_adapter);
+ go->i2c_adapter_online = 0;
}
if (go->audio_enabled)
OpenPOWER on IntegriCloud