6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Punnay Sharma [ Upstream commit 5764f9bd7b7a72c6df49db6c8c00d4f9994a55ba ] In sp8870_read_ber(), the 14-bit Bit Error Rate (BER) is assembled by reading two I2C registers: 0xC08 (lower 6 bits) and 0xC07 (upper 8 bits). The current implementation masks the lower bits via `tmp = ret & 0x3F;` but subsequently overwrites `tmp` entirely when processing the upper bits using a direct assignment (`tmp = ret << 6;`). This logical error causes the lower 6 bits of the BER hardware metric to be silently discarded. Fix this by using a bitwise OR (`tmp |= ret << 6;`) to correctly merge the MSB and LSB payloads before returning the metric to the DVB core. Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Cc: stable@vger.kernel.org Signed-off-by: Punnay Sharma Signed-off-by: Hans Verkuil Signed-off-by: Sasha Levin --- drivers/staging/media/av7110/sp8870.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/av7110/sp8870.c b/drivers/staging/media/av7110/sp8870.c index 0c813860f5b20..96fd738777744 100644 --- a/drivers/staging/media/av7110/sp8870.c +++ b/drivers/staging/media/av7110/sp8870.c @@ -401,7 +401,7 @@ static int sp8870_read_ber(struct dvb_frontend *fe, u32 *ber) if (ret < 0) return -EIO; - tmp = ret << 6; + tmp |= ret << 6; if (tmp >= 0x3FFF0) tmp = ~0; -- 2.53.0