diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-09 03:16:49 -0500 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-04-02 01:07:32 -0400 |
commit | 51d95709dddf7fdf6769a547de37a9c98edf8df9 (patch) | |
tree | 579dc916a198211c7ec934dfc7adba1b68334d42 /drivers/i2c | |
parent | a205e63d12716bd871b6a5746b6b624c5965a059 (diff) |
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: Lars-Peter Clausen <lars@metafoo.de>
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/i2c-mux.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-mux.c b/drivers/i2c/i2c-mux.c index 361b78d76759..7409ebb33c47 100644 --- a/drivers/i2c/i2c-mux.c +++ b/drivers/i2c/i2c-mux.c | |||
@@ -191,14 +191,12 @@ struct i2c_adapter *i2c_add_mux_adapter(struct i2c_adapter *parent, | |||
191 | } | 191 | } |
192 | EXPORT_SYMBOL_GPL(i2c_add_mux_adapter); | 192 | EXPORT_SYMBOL_GPL(i2c_add_mux_adapter); |
193 | 193 | ||
194 | int i2c_del_mux_adapter(struct i2c_adapter *adap) | 194 | void i2c_del_mux_adapter(struct i2c_adapter *adap) |
195 | { | 195 | { |
196 | struct i2c_mux_priv *priv = adap->algo_data; | 196 | struct i2c_mux_priv *priv = adap->algo_data; |
197 | 197 | ||
198 | i2c_del_adapter(adap); | 198 | i2c_del_adapter(adap); |
199 | kfree(priv); | 199 | kfree(priv); |
200 | |||
201 | return 0; | ||
202 | } | 200 | } |
203 | EXPORT_SYMBOL_GPL(i2c_del_mux_adapter); | 201 | EXPORT_SYMBOL_GPL(i2c_del_mux_adapter); |
204 | 202 | ||