mfd: da9052: Simplify function return logic
The invoked functions already return zero on success or a negative errno code so there is no need to open code the logic in the caller. Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Acked-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
This commit is contained in:
parent
a1c16d71bc
commit
ad698ea425
|
@ -174,11 +174,7 @@ static int da9052_i2c_probe(struct i2c_client *client,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = da9052_device_init(da9052, id->driver_data);
|
return da9052_device_init(da9052, id->driver_data);
|
||||||
if (ret != 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int da9052_i2c_remove(struct i2c_client *client)
|
static int da9052_i2c_remove(struct i2c_client *client)
|
||||||
|
|
|
@ -56,11 +56,7 @@ static int da9052_spi_probe(struct spi_device *spi)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = da9052_device_init(da9052, id->driver_data);
|
return da9052_device_init(da9052, id->driver_data);
|
||||||
if (ret != 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int da9052_spi_remove(struct spi_device *spi)
|
static int da9052_spi_remove(struct spi_device *spi)
|
||||||
|
|
Loading…
Reference in New Issue