mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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 <[email protected]> Acked-by: Guenter Roeck <[email protected]> Reviewed-by: Jean Delvare <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
This commit is contained in:
parent
71546300c8
commit
a205e63d12
1 changed files with 2 additions and 4 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue