Sfoglia il codice sorgente

[6PACK]: Masking bug in 6pack driver.

Looks like a broken masking to me, binary not is used where bitwise
not was intended.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Jean Delvare 18 anni fa
parent
commit
95f6134e17
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      drivers/net/hamradio/6pack.c

+ 1 - 1
drivers/net/hamradio/6pack.c

@@ -914,7 +914,7 @@ static void decode_prio_command(struct sixpack *sp, unsigned char cmd)
 					printk(KERN_DEBUG "6pack: protocol violation\n");
 				else
 					sp->status = 0;
-				cmd &= !SIXP_RX_DCD_MASK;
+				cmd &= ~SIXP_RX_DCD_MASK;
 		}
 		sp->status = cmd & SIXP_PRIO_DATA_MASK;
 	} else { /* output watchdog char if idle */