diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-09 08:16:48 +0000 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-04-02 07:07:29 +0200 |
commit | a205e63d12716bd871b6a5746b6b624c5965a059 (patch) | |
tree | e686069e510da9a800a40a877d5844a9803a569c /drivers/i2c | |
parent | 71546300c8684eb69286604c79624582c16f2f5b (diff) | |
download | linux-3.10-a205e63d12716bd871b6a5746b6b624c5965a059.tar.gz linux-3.10-a205e63d12716bd871b6a5746b6b624c5965a059.tar.bz2 linux-3.10-a205e63d12716bd871b6a5746b6b624c5965a059.zip |
i2c: Ignore the return value of i2c_del_mux_adapter()
i2c_del_mux_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 its return
value and assume that it will always succeed (which it will). A subsequent
patch will make the return type of i2c_del_mux_adapter() void.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/muxes/i2c-mux-pca954x.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c index 8e4387235b6..a531d801dbe 100644 --- a/drivers/i2c/muxes/i2c-mux-pca954x.c +++ b/drivers/i2c/muxes/i2c-mux-pca954x.c @@ -262,13 +262,11 @@ static int pca954x_remove(struct i2c_client *client) { struct pca954x *data = i2c_get_clientdata(client); const struct chip_desc *chip = &chips[data->type]; - int i, err; + int i; for (i = 0; i < chip->nchans; ++i) if (data->virt_adaps[i]) { - err = i2c_del_mux_adapter(data->virt_adaps[i]); - if (err) - return err; + i2c_del_mux_adapter(data->virt_adaps[i]); data->virt_adaps[i] = NULL; } |