meson: i2c: fix coverity warning

PD#172722: meson: i2c: fix coverity warning

Here,the value of "ret" must be equal to 0,
so that the program cannot execute to the left of
the expression "return ret ?: size;".
This causes "Logically dead code".

Change-Id: Ief0cdb891e5583f0fba1ff166b40a5e71b67342f
Signed-off-by: Yingyuan Zhu <yingyuan.zhu@amlogic.com>
This commit is contained in:
Yingyuan Zhu
2018-08-29 13:48:27 +08:00
committed by Jianxin Pan
parent 2bc5fc8909
commit 9ed5567433

View File

@@ -525,7 +525,7 @@ static ssize_t meson_i2c_speed_store(struct device *child,
return ret;
i2c->frequency = val;
return ret ? : size;
return size;
}
static DEVICE_ATTR(speed, 0644, meson_i2c_speed_show,