NFC: Remove pointless conditional before HCI kfree_skb()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 28 Aug 2012 13:02:40 +0000 (21:02 +0800)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 24 Sep 2012 22:17:24 +0000 (00:17 +0200)
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
net/nfc/hci/core.c
net/nfc/hci/shdlc.c

index 03646be..15744c0 100644 (file)
@@ -398,8 +398,7 @@ disconnect_all:
        nfc_hci_disconnect_all_gates(hdev);
 
 exit:
-       if (skb)
-               kfree_skb(skb);
+       kfree_skb(skb);
 
        return r;
 }
index 39b51ea..824fb09 100644 (file)
@@ -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)