From b11a89d5d2493f440b6c718bbcd7dbb0733b02b5 Mon Sep 17 00:00:00 2001 From: Anderson Reis Date: Fri, 8 Mar 2019 16:46:54 -0300 Subject: 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 Signed-off-by: Anderson Reis Signed-off-by: Jonathan Cameron --- drivers/iio/potentiostat/lmp91000.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/iio/potentiostat') 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) 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; -- cgit v1.2.3