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 03646beb3a730c612d6972d03fe6a8fb88070504..15744c01bddce7694465aa6062dc93c79489074c 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 39b51eacc391bce2f36c84acb81dea8001ded4e0..824fb09384ed526abb6d6912c992e58f2c189295 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)