lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 20 Jan 2010 03:20:14 +0100
From:	Roel Kluin <roel.kluin@...il.com>
To:	Mauro Carvalho Chehab <mchehab@...radead.org>,
	linux-media@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] mxl5005s: bad checks of state->Mode

Regardless of the state->Mode in both cases the same value was
written.
If state->Mode wasn't set, it is always 0.

Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
 drivers/media/common/tuners/mxl5005s.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

Or were the ones and zeroes in these MXL_ControlWrite in the wrong place?

diff --git a/drivers/media/common/tuners/mxl5005s.c b/drivers/media/common/tuners/mxl5005s.c
index 605e28b..3967412 100644
--- a/drivers/media/common/tuners/mxl5005s.c
+++ b/drivers/media/common/tuners/mxl5005s.c
@@ -1815,9 +1815,8 @@ static u16 MXL_BlockInit(struct dvb_frontend *fe)
 
 	/* Charge Pump Control Dig  Ana */
 	status += MXL_ControlWrite(fe, RFSYN_CHP_GAIN, state->Mode ? 5 : 8);
-	status += MXL_ControlWrite(fe,
-		RFSYN_EN_CHP_HIGAIN, state->Mode ? 1 : 1);
-	status += MXL_ControlWrite(fe, EN_CHP_LIN_B, state->Mode ? 0 : 0);
+	status += MXL_ControlWrite(fe, RFSYN_EN_CHP_HIGAIN, 1);
+	status += MXL_ControlWrite(fe, EN_CHP_LIN_B, 0);
 
 	/* AGC TOP Control */
 	if (state->AGC_Mode == 0) /* Dual AGC */ {
@@ -2161,7 +2160,7 @@ static u16 MXL_IFSynthInit(struct dvb_frontend *fe)
 		}
 	}
 
-	if (state->Mode || (state->Mode == 0 && state->IF_Mode == 0)) {
+	if (state->Mode || state->IF_Mode == 0) {
 		if (state->IF_LO == 57000000UL) {
 			status += MXL_ControlWrite(fe, IF_DIVVAL,   0x10);
 			status += MXL_ControlWrite(fe, IF_VCO_BIAS, 0x08);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ