]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Bluetooth: Do not use assignments in IF conditions
authorSzymon Janc <szymon.janc@tieto.com>
Mon, 21 Mar 2011 13:20:03 +0000 (14:20 +0100)
committerGustavo F. Padovan <padovan@profusion.mobi>
Thu, 31 Mar 2011 17:22:56 +0000 (14:22 -0300)
Fix checkpatch warnings concerning assignments in if conditions.

Signed-off-by: Szymon Janc <szymon.janc@tieto.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
net/bluetooth/cmtp/core.c

index 964ea9126f9fc5ac2b6a84647ecbc2ecefc8b2ed..16aa6bd039ba085b34488718469ea3c668413daf 100644 (file)
@@ -235,9 +235,12 @@ static void cmtp_process_transmit(struct cmtp_session *session)
 
                size = min_t(uint, ((tail < 258) ? (tail - 2) : (tail - 3)), skb->len);
 
-               if ((scb->id < 0) && ((scb->id = cmtp_alloc_block_id(session)) < 0)) {
-                       skb_queue_head(&session->transmit, skb);
-                       break;
+               if (scb->id < 0) {
+                       scb->id = cmtp_alloc_block_id(session);
+                       if (scb->id < 0) {
+                               skb_queue_head(&session->transmit, skb);
+                               break;
+                       }
                }
 
                if (size < 256) {