Commit ad698ea4 authored by Javier Martinez Canillas's avatar Javier Martinez Canillas Committed by Lee Jones

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: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Acked-by: default avatarAdam Thomson <Adam.Thomson.Opensource@diasemi.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent a1c16d71
...@@ -174,11 +174,7 @@ static int da9052_i2c_probe(struct i2c_client *client, ...@@ -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) ...@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment