summaryrefslogtreecommitdiffstats
path: root/drivers/iio/potentiostat
diff options
context:
space:
mode:
authorAnderson Reis <andersonreisrosa@gmail.com>2019-03-08 14:46:54 -0500
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-04-04 15:19:55 -0400
commitb11a89d5d2493f440b6c718bbcd7dbb0733b02b5 (patch)
tree16a74ff267a1e9e5a7b78f84033202a42c4012c4 /drivers/iio/potentiostat
parentcd4779f120c1acc5448b803c8d9374d0dc064996 (diff)
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: Lucas Oshiro <lucasseikioshiro@gmail.com> Signed-off-by: Anderson Reis <andersonreisrosa@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/potentiostat')
-rw-r--r--drivers/iio/potentiostat/lmp91000.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index c45cfb632649..7127ab926b9e 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -211,12 +211,11 @@ static int lmp91000_read_config(struct lmp91000_data *data)
211 211
212 ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val); 212 ret = of_property_read_u32(np, "ti,tia-gain-ohm", &val);
213 if (ret) { 213 if (ret) {
214 if (of_property_read_bool(np, "ti,external-tia-resistor")) 214 if (!of_property_read_bool(np, "ti,external-tia-resistor")) {
215 val = 0;
216 else {
217 dev_err(dev, "no ti,tia-gain-ohm defined"); 215 dev_err(dev, "no ti,tia-gain-ohm defined");
218 return ret; 216 return ret;
219 } 217 }
218 val = 0;
220 } 219 }
221 220
222 ret = -EINVAL; 221 ret = -EINVAL;