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

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@qemulion


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 5ae34494
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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,