projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2bc5fc8
)
meson: i2c: fix coverity warning
author
Yingyuan Zhu
<yingyuan.zhu@amlogic.com>
Wed, 29 Aug 2018 05:48:27 +0000
(13:48 +0800)
committer
Jianxin Pan
<jianxin.pan@amlogic.com>
Thu, 6 Sep 2018 14:02:18 +0000
(07:02 -0700)
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>
drivers/amlogic/i2c/i2c-meson-master.c
patch
|
blob
|
history
diff --git
a/drivers/amlogic/i2c/i2c-meson-master.c
b/drivers/amlogic/i2c/i2c-meson-master.c
index 85a6b3d2c8bead1e15311dc3602b0ed29f850dcf..26c4d6e0bf80bfd129888c8e08da41d33bff28cd 100644
(file)
--- a/
drivers/amlogic/i2c/i2c-meson-master.c
+++ b/
drivers/amlogic/i2c/i2c-meson-master.c
@@
-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,