From 22a09b439af25fefbe0ebd1c6c2a0d81e923f2f5 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 26 Jun 2012 04:40:38 -0300 Subject: [PATCH] [media] drxk: fix a '&' vs '|' bug IQM_AF_CLKNEG_CLKNEGDATA__M is 0x2 and IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS is 0. (clkNeg | 0x2) is never equal to zero so the condition can never be true. I consulted with Ralph Metzler and the '|' should be changed to a '&'. Signed-off-by: Dan Carpenter CC: Ralph Metzler Tested-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab --- drivers/media/dvb/frontends/drxk_hard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/dvb/frontends/drxk_hard.c b/drivers/media/dvb/frontends/drxk_hard.c index 8fa28bb47088..317530f891c0 100644 --- a/drivers/media/dvb/frontends/drxk_hard.c +++ b/drivers/media/dvb/frontends/drxk_hard.c @@ -3004,7 +3004,7 @@ static int ADCSynchronization(struct drxk_state *state) status = read16(state, IQM_AF_CLKNEG__A, &clkNeg); if (status < 0) goto error; - if ((clkNeg | IQM_AF_CLKNEG_CLKNEGDATA__M) == + if ((clkNeg & IQM_AF_CLKNEG_CLKNEGDATA__M) == IQM_AF_CLKNEG_CLKNEGDATA_CLK_ADC_DATA_POS) { clkNeg &= (~(IQM_AF_CLKNEG_CLKNEGDATA__M)); clkNeg |= -- 2.20.1