staging: iio: meter: replace ternary operator by if condition

Replace ternary operator by simple if based evaluation of the return
value. Issue identified using coccicheck.

Signed-off-by: Deepak R Varma <drv@mailo.com>
Link: https://lore.kernel.org/r/Y3CAdCa17WdWDYUa@qemulion
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
Deepak R Varma 2022-11-13 10:58:20 +05:30 committed by Jonathan Cameron
parent 5ae34494cf
commit 572cc583c9

View file

@ -61,7 +61,10 @@ static int ade7854_i2c_write_reg(struct device *dev,
unlock:
mutex_unlock(&st->buf_lock);
return ret < 0 ? ret : 0;
if (ret < 0)
return ret;
return 0;
}
static int ade7854_i2c_read_reg(struct device *dev,