Commit b11a89d5 authored by Anderson Reis's avatar Anderson Reis Committed by Jonathan Cameron

iio:potentiostat:lmp91000: invert if statement

Invert if statement arms in line 214, in order to make the code cleaner,
solve these checkpatch.pl CHECKs:

- lmp9100.c:214: CHECK: braces {} should be used on all arms of this statement
- lmp9100.c:216: CHECK: Unbalanced braces around else statement
Signed-off-by: default avatarLucas Oshiro <lucasseikioshiro@gmail.com>
Signed-off-by: default avatarAnderson Reis <andersonreisrosa@gmail.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent cd4779f1
......@@ -211,12 +211,11 @@ static int lmp91000_read_config(struct lmp91000_data *data)
ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val);
if (ret) {
if (of_property_read_bool(np, "ti,external-tia-resistor"))
val = 0;
else {
if (!of_property_read_bool(np, "ti,external-tia-resistor")) {
dev_err(dev, "no ti,tia-gain-ohm defined");
return ret;
}
val = 0;
}
ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment