projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec2328c
)
mfd: Ensure value written by wm831x_set_bits() is within the mask
author
Mark Brown
<broonie@opensource.wolfsonmicro.com>
Mon, 20 Jun 2011 11:25:58 +0000
(12:25 +0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Sun, 31 Jul 2011 21:28:23 +0000
(23:28 +0200)
Purely for defensiveness.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/wm831x-core.c
patch
|
blob
|
history
diff --git
a/drivers/mfd/wm831x-core.c
b/drivers/mfd/wm831x-core.c
index 772fe584f3b822b1f92bd5d1046def37155aa82f..baae9e47bffb21fa3249843bfe391a641ce0ce61 100644
(file)
--- a/
drivers/mfd/wm831x-core.c
+++ b/
drivers/mfd/wm831x-core.c
@@
-295,7
+295,7
@@
int wm831x_set_bits(struct wm831x *wm831x, unsigned short reg,
goto out;
r &= ~mask;
- r |= val;
+ r |= val
& mask
;
ret = wm831x_write(wm831x, reg, 2, &r);