From: Deepak R Varma Date: Sun, 13 Nov 2022 05:28:20 +0000 (+0530) Subject: staging: iio: meter: replace ternary operator by if condition X-Git-Tag: v6.2-rc1~67^2~20^2~4 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=572cc583c92e7b113a0d0f650b02d80505920eef;p=linux-block.git 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 Link: https://lore.kernel.org/r/Y3CAdCa17WdWDYUa@qemulion Signed-off-by: Jonathan Cameron --- diff --git a/drivers/staging/iio/meter/ade7854-i2c.c b/drivers/staging/iio/meter/ade7854-i2c.c index a9a06e8dda51..71b67dd3c8e9 100644 --- a/drivers/staging/iio/meter/ade7854-i2c.c +++ b/drivers/staging/iio/meter/ade7854-i2c.c @@ -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,