提交 b00cd68e 编写于 作者: M Mark Brown 提交者: Samuel Ortiz

mfd: Ensure value written by wm831x_set_bits() is within the mask

Purely for defensiveness.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NSamuel Ortiz <sameo@linux.intel.com>
上级 ec2328c3
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册