staging: iio: isl29018: combine two return statements into one
authorBrian Masney <masneyb@onstation.org>
Mon, 10 Oct 2016 07:19:58 +0000 (03:19 -0400)
committerJonathan Cameron <jic23@kernel.org>
Sun, 23 Oct 2016 18:33:42 +0000 (19:33 +0100)
Use the return value from isl29018_set_integration_time() as the return
value for isl29018_chip_init() since this is the last piece of work
inside that function.

Signed-off-by: Brian Masney <masneyb@onstation.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/staging/iio/light/isl29018.c

index 132de8e93bf898a8a30453adf7751e80942f14a8..6b6c761c801dc66214ab1a9d623007b3a2415d46 100644 (file)
@@ -616,12 +616,10 @@ static int isl29018_chip_init(struct isl29018_chip *chip)
 
        status = isl29018_set_integration_time(chip,
                        isl29018_int_utimes[chip->type][chip->int_time]);
-       if (status < 0) {
+       if (status < 0)
                dev_err(dev, "Init of isl29018 fails\n");
-               return status;
-       }
 
-       return 0;
+       return status;
 }
 
 static const struct iio_info isl29018_info = {