staging: iio: light: fix multiple assignments in a single line
authorEva Rachel Retuya <eraretuya@gmail.com>
Thu, 18 Feb 2016 07:35:40 +0000 (15:35 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:45:56 +0000 (14:45 -0800)
Rewrite the multiple assignments to clear checkpatch check:

CHECK: multiple assignments should be avoided

Signed-off-by: Eva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/iio/light/tsl2583.c

index e970b3ff140eb6574357206d7625b610e0b1ca72..05b4ad4e941c2c9182ede14bd0c87c4d066ebb88 100644 (file)
@@ -267,7 +267,8 @@ static int taos_get_lux(struct iio_dev *indio_dev)
 
        if (!ch0) {
                /* have no data, so return LAST VALUE */
-               ret = chip->als_cur_info.lux = 0;
+               ret = 0;
+               chip->als_cur_info.lux = 0;
                goto out_unlock;
        }
        /* calculate ratio */
@@ -292,7 +293,8 @@ static int taos_get_lux(struct iio_dev *indio_dev)
        /* note: lux is 31 bit max at this point */
        if (ch1lux > ch0lux) {
                dev_dbg(&chip->client->dev, "No Data - Return last value\n");
-               ret = chip->als_cur_info.lux = 0;
+               ret = 0;
+               chip->als_cur_info.lux = 0;
                goto out_unlock;
        }