Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b00cd68e authored by Mark Brown's avatar Mark Brown Committed by Samuel Ortiz
Browse files

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



Purely for defensiveness.

Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarSamuel Ortiz <sameo@linux.intel.com>
parent ec2328c3
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);