diff options
author | kbuild test robot <fengguang.wu@intel.com> | 2015-09-22 10:21:48 +0800 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-09-23 20:23:30 +0100 |
commit | ebe5c543cf8ed3010881a8d863e954b961013fea (patch) | |
tree | 379c5c225576d0cafe86fd9a64c61b02b6ea314b /drivers/iio/light | |
parent | 36736cc66bcedcd25b65faff43e352491409971f (diff) | |
download | linux-ebe5c543cf8ed3010881a8d863e954b961013fea.tar.bz2 |
iio: apds9960: light: fix simple_return.cocci warnings
drivers/iio/light/apds9960.c:986:1-4: WARNING: end returns can be simpified
Simplify a trivial if-return sequence. Possibly combine with a
preceding function call.
Generated by: scripts/coccinelle/misc/simple_return.cocci
CC: Matt Ranostay <mranostay@gmail.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/light')
-rw-r--r-- | drivers/iio/light/apds9960.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/iio/light/apds9960.c b/drivers/iio/light/apds9960.c index 27f415743733..8d7ce6a9296d 100644 --- a/drivers/iio/light/apds9960.c +++ b/drivers/iio/light/apds9960.c @@ -983,11 +983,7 @@ static int apds9960_chip_init(struct apds9960_data *data) if (ret) return ret; - ret = apds9960_set_powermode(data, 1); - if (ret) - return ret; - - return 0; + return apds9960_set_powermode(data, 1); } static int apds9960_probe(struct i2c_client *client, |