提交 572cc583 编写于 作者: D Deepak R Varma 提交者: 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: NDeepak R Varma <drv@mailo.com>
Link: https://lore.kernel.org/r/Y3CAdCa17WdWDYUa@qemulionSigned-off-by: NJonathan Cameron <Jonathan.Cameron@huawei.com>
上级 5ae34494
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册