Browse Source

NFC: Remove pointless conditional before HCI kfree_skb()

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Wei Yongjun 13 years ago
parent
commit
33e5971358
2 changed files with 2 additions and 4 deletions
  1. 1 2
      net/nfc/hci/core.c
  2. 1 2
      net/nfc/hci/shdlc.c

+ 1 - 2
net/nfc/hci/core.c

@@ -398,8 +398,7 @@ disconnect_all:
 	nfc_hci_disconnect_all_gates(hdev);
 
 exit:
-	if (skb)
-		kfree_skb(skb);
+	kfree_skb(skb);
 
 	return r;
 }

+ 1 - 2
net/nfc/hci/shdlc.c

@@ -241,8 +241,7 @@ static void nfc_shdlc_rcv_i_frame(struct nfc_shdlc *shdlc,
 	}
 
 exit:
-	if (skb)
-		kfree_skb(skb);
+	kfree_skb(skb);
 }
 
 static void nfc_shdlc_rcv_ack(struct nfc_shdlc *shdlc, int y_nr)