Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Javier Martinez Canillas and committed by
Lee Jones
ad698ea4 a1c16d71

+2 -10
+1 -5
drivers/mfd/da9052-i2c.c
··· 174 174 return ret; 175 175 } 176 176 177 - ret = da9052_device_init(da9052, id->driver_data); 178 - if (ret != 0) 179 - return ret; 180 - 181 - return 0; 177 + return da9052_device_init(da9052, id->driver_data); 182 178 } 183 179 184 180 static int da9052_i2c_remove(struct i2c_client *client)
+1 -5
drivers/mfd/da9052-spi.c
··· 56 56 return ret; 57 57 } 58 58 59 - ret = da9052_device_init(da9052, id->driver_data); 60 - if (ret != 0) 61 - return ret; 62 - 63 - return 0; 59 + return da9052_device_init(da9052, id->driver_data); 64 60 } 65 61 66 62 static int da9052_spi_remove(struct spi_device *spi)