Commit 572cc583 authored by Deepak R Varma's avatar Deepak R Varma Committed by Jonathan Cameron

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: default avatarDeepak R Varma <drv@mailo.com>
Link: https://lore.kernel.org/r/Y3CAdCa17WdWDYUa@qemulionSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5ae34494
...@@ -61,7 +61,10 @@ static int ade7854_i2c_write_reg(struct device *dev, ...@@ -61,7 +61,10 @@ static int ade7854_i2c_write_reg(struct device *dev,
unlock: unlock:
mutex_unlock(&st->buf_lock); 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, static int ade7854_i2c_read_reg(struct device *dev,
......
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