iwlwifi: dvm: Fix probable mask then right shift defect
authorJoe Perches <joe@perches.com>
Mon, 27 Oct 2014 05:25:03 +0000 (22:25 -0700)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 29 Oct 2014 10:53:07 +0000 (12:53 +0200)
Precedence of & and >> is not the same and is not left to right.
shift has higher precedence and should be done after the mask.

Add parentheses around the mask.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/dvm/lib.c

index 2191621..02e4ede 100644 (file)
@@ -418,8 +418,8 @@ void iwlagn_bt_adjust_rssi_monitor(struct iwl_priv *priv, bool rssi_ena)
 
 static bool iwlagn_bt_traffic_is_sco(struct iwl_bt_uart_msg *uart_msg)
 {
-       return BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3 >>
-                       BT_UART_MSG_FRAME3SCOESCO_POS;
+       return (BT_UART_MSG_FRAME3SCOESCO_MSK & uart_msg->frame3) >>
+               BT_UART_MSG_FRAME3SCOESCO_POS;
 }
 
 static void iwlagn_bt_traffic_change_work(struct work_struct *work)