mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-18 05:04:04 +00:00
mfd: Ensure value written by wm831x_set_bits() is within the mask
Purely for defensiveness. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
ec2328c30b
commit
b00cd68eb3
1 changed files with 1 additions and 1 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue