提交 84681c7c 编写于 作者: E Eva Rachel Retuya 提交者: Greg Kroah-Hartman

staging: iio: resolver: add missing braces on if-else statements

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: NEva Rachel Retuya <eraretuya@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 8d80ccbb
...@@ -319,9 +319,9 @@ static ssize_t ad2s1210_store_control(struct device *dev, ...@@ -319,9 +319,9 @@ static ssize_t ad2s1210_store_control(struct device *dev,
data = ad2s1210_read_resolution_pin(st); data = ad2s1210_read_resolution_pin(st);
if (data != st->resolution) if (data != st->resolution)
dev_warn(dev, "ad2s1210: resolution settings not match\n"); dev_warn(dev, "ad2s1210: resolution settings not match\n");
} else } else {
ad2s1210_set_resolution_pin(st); ad2s1210_set_resolution_pin(st);
}
ret = len; ret = len;
st->hysteresis = !!(data & AD2S1210_ENABLE_HYSTERESIS); st->hysteresis = !!(data & AD2S1210_ENABLE_HYSTERESIS);
...@@ -381,8 +381,9 @@ static ssize_t ad2s1210_store_resolution(struct device *dev, ...@@ -381,8 +381,9 @@ static ssize_t ad2s1210_store_resolution(struct device *dev,
data = ad2s1210_read_resolution_pin(st); data = ad2s1210_read_resolution_pin(st);
if (data != st->resolution) if (data != st->resolution)
dev_warn(dev, "ad2s1210: resolution settings not match\n"); dev_warn(dev, "ad2s1210: resolution settings not match\n");
} else } else {
ad2s1210_set_resolution_pin(st); ad2s1210_set_resolution_pin(st);
}
ret = len; ret = len;
error_ret: error_ret:
mutex_unlock(&st->lock); mutex_unlock(&st->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册