Skip to contentSkip to conversation

Masking bug in 6pack driver

6PACK Applied Ralf Baechle 2 participants 2 messages Nov 23, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

---
 drivers/net/hamradio/6pack.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/hamradio/6pack.c +1 -1
index 102c1f0..d1f6895 100644
@@ -915,7 +915,7 @@ static void decode_prio_command(struct s
 					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 */