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>
This commit is contained in:

committed by
Wolfram Sang

parent
f5fb082295
commit
bf51a8c5e0
@@ -213,14 +213,8 @@ static const struct i2c_algorithm i2c_powermac_algorithm = {
|
||||
static int i2c_powermac_remove(struct platform_device *dev)
|
||||
{
|
||||
struct i2c_adapter *adapter = platform_get_drvdata(dev);
|
||||
int rc;
|
||||
|
||||
rc = i2c_del_adapter(adapter);
|
||||
/* We aren't that prepared to deal with this... */
|
||||
if (rc)
|
||||
printk(KERN_WARNING
|
||||
"i2c-powermac.c: Failed to remove bus %s !\n",
|
||||
adapter->name);
|
||||
i2c_del_adapter(adapter);
|
||||
memset(adapter, 0, sizeof(*adapter));
|
||||
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user