From: Dan Carpenter Date: Thu, 18 Apr 2013 18:20:40 +0000 (-0300) Subject: [media] r820t: precendence bug in r820t_xtal_check() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=f7a12fdfd6b6a6f37827d213e67930b945d3081d;p=openwrt%2Fstaging%2Fblogic.git [media] r820t: precendence bug in r820t_xtal_check() The test as written is always false. It looks like the intent was to test that the bit was not set. Signed-off-by: Dan Carpenter Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/tuners/r820t.c b/drivers/media/tuners/r820t.c index 905a10615e52..ba033fd6b717 100644 --- a/drivers/media/tuners/r820t.c +++ b/drivers/media/tuners/r820t.c @@ -1378,7 +1378,7 @@ static int r820t_xtal_check(struct r820t_priv *priv) rc = r820t_read(priv, 0x00, data, sizeof(data)); if (rc < 0) return rc; - if ((!data[2]) & 0x40) + if (!(data[2] & 0x40)) continue; val = data[2] & 0x3f;