Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51d95709 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Wolfram Sang
Browse files

i2c: Make the return type of i2c_del_mux_adapter() void



i2c_del_mux_adapter always returns 0 and none of it current users check its
return value anyway. It is also an essential requirement of the Linux device
driver model, that functions which may be called from a device's remove callback
to free resources provided by the device, are not allowed to fail. This is the
case for i2c_del_mux_adapter(), so make its return type void to make the
fact that it won't fail explicit.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Reviewed-by: default avatarJean Delvare <khali@linux-fr.org>
Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
parent a205e63d
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -191,14 +191,12 @@ struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent,
}
}
EXPORT_SYMBOL_GPL(i2c_add_mux_adapter);
EXPORT_SYMBOL_GPL(i2c_add_mux_adapter);


int i2c_del_mux_adapter(struct i2c_adapter *adap)
void i2c_del_mux_adapter(struct i2c_adapter *adap)
{
{
	struct i2c_mux_priv *priv = adap->algo_data;
	struct i2c_mux_priv *priv = adap->algo_data;


	i2c_del_adapter(adap);
	i2c_del_adapter(adap);
	kfree(priv);
	kfree(priv);

	return 0;
}
}
EXPORT_SYMBOL_GPL(i2c_del_mux_adapter);
EXPORT_SYMBOL_GPL(i2c_del_mux_adapter);


+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent,
				int (*deselect) (struct i2c_adapter *,
				int (*deselect) (struct i2c_adapter *,
						 void *mux_dev, u32 chan_id));
						 void *mux_dev, u32 chan_id));


int i2c_del_mux_adapter(struct i2c_adapter *adap);
void i2c_del_mux_adapter(struct i2c_adapter *adap);


#endif /* __KERNEL__ */
#endif /* __KERNEL__ */