Re: [patch] [media] af9013: change & to &&

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Clear bug, I will test it later when applied to master if not already. Thanks!

Acked-by: Antti Palosaari <crope@xxxxxx>


On 01/05/2012 08:23 AM, Dan Carpenter wrote:
This is just a cleanup, it doesn't change how the code works.  These
are compound conditions and not bitwise operations so it should be&&
and not&.

Signed-off-by: Dan Carpenter<dan.carpenter@xxxxxxxxxx>

diff --git a/drivers/media/dvb/frontends/af9013.c b/drivers/media/dvb/frontends/af9013.c
index e6ba3e0..1413c51 100644
--- a/drivers/media/dvb/frontends/af9013.c
+++ b/drivers/media/dvb/frontends/af9013.c
@@ -120,8 +120,8 @@ static int af9013_wr_regs(struct af9013_state *priv, u16 reg, const u8 *val,
  	int ret, i;
  	u8 mbox = (0<<  7)|(0<<  6)|(1<<  1)|(1<<  0);

-	if ((priv->config.ts_mode == AF9013_TS_USB)&
-		((reg&  0xff00) != 0xff00)&  ((reg&  0xff00) != 0xae00)) {
+	if ((priv->config.ts_mode == AF9013_TS_USB)&&
+		((reg&  0xff00) != 0xff00)&&  ((reg&  0xff00) != 0xae00)) {
  		mbox |= ((len - 1)<<  2);
  		ret = af9013_wr_regs_i2c(priv, mbox, reg, val, len);
  	} else {
@@ -142,8 +142,8 @@ static int af9013_rd_regs(struct af9013_state *priv, u16 reg, u8 *val, int len)
  	int ret, i;
  	u8 mbox = (0<<  7)|(0<<  6)|(1<<  1)|(0<<  0);

-	if ((priv->config.ts_mode == AF9013_TS_USB)&
-		((reg&  0xff00) != 0xff00)&  ((reg&  0xff00) != 0xae00)) {
+	if ((priv->config.ts_mode == AF9013_TS_USB)&&
+		((reg&  0xff00) != 0xff00)&&  ((reg&  0xff00) != 0xae00)) {
  		mbox |= ((len - 1)<<  2);
  		ret = af9013_rd_regs_i2c(priv, mbox, reg, val, len);
  	} else {


--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux