staging: iio: resolver: add missing braces on if-else statements
authorEva Rachel Retuya <eraretuya@gmail.com>
Thu, 18 Feb 2016 10:59:36 +0000 (18:59 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Feb 2016 22:46:35 +0000 (14:46 -0800)
Add braces around the else clause to adhere to kernel coding style. This
clears the following checkpatch issue:

CHECK: braces {} should be used on all arms of this statement

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

index 4cf5e4144448d80c729396ebf7155a31f7fafea5..563a01c29e731f8bb8ec7d8c9fac99e3ab30173a 100644 (file)
@@ -319,9 +319,9 @@ static ssize_t ad2s1210_store_control(struct device *dev,
                data = ad2s1210_read_resolution_pin(st);
                if (data != st->resolution)
                        dev_warn(dev, "ad2s1210: resolution settings not match\n");
-       } else
+       } else {
                ad2s1210_set_resolution_pin(st);
-
+       }
        ret = len;
        st->hysteresis = !!(data & AD2S1210_ENABLE_HYSTERESIS);
 
@@ -381,8 +381,9 @@ static ssize_t ad2s1210_store_resolution(struct device *dev,
                data = ad2s1210_read_resolution_pin(st);
                if (data != st->resolution)
                        dev_warn(dev, "ad2s1210: resolution settings not match\n");
-       } else
+       } else {
                ad2s1210_set_resolution_pin(st);
+       }
        ret = len;
 error_ret:
        mutex_unlock(&st->lock);