OSDN Git Service

staging:iio:light: Add some missing brackets to make sure code works as intended.
authorJonathan Cameron <jic23@kernel.org>
Sat, 2 May 2015 11:05:05 +0000 (12:05 +0100)
committerJonathan Cameron <jic23@kernel.org>
Thu, 7 May 2015 09:42:17 +0000 (10:42 +0100)
Note this is not a bug due to the fact the region cannot be reached without the sanity check passing. The autobuilder reported it as missaligned code which is kind of true as well.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Roberta Dobrescu <roberta.dobrescu@gmail.com>
drivers/staging/iio/light/isl29018.c

index 08ca9a4..e646c5d 100644 (file)
@@ -369,12 +369,13 @@ static int isl29018_write_raw(struct iio_dev *indio_dev,
                }
                break;
        case IIO_CHAN_INFO_INT_TIME:
-               if (chan->type == IIO_LIGHT)
+               if (chan->type == IIO_LIGHT) {
                        if (val != 0) {
                                mutex_unlock(&chip->lock);
                                return -EINVAL;
                        }
                        ret = isl29018_set_integration_time(chip, val2);
+               }
                break;
        case IIO_CHAN_INFO_SCALE:
                if (chan->type == IIO_LIGHT)