From: Christophe Ricard Date: Sun, 10 Aug 2014 22:04:53 +0000 (+0200) Subject: NFC: st21nfca: Remove useless err == 0 condition X-Git-Tag: v3.18-rc1~115^2~39^2~72^2~22 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=32b41d8f7587b6e8a2cbb3a15f83c3a9687f1f17;p=karo-tx-linux.git NFC: st21nfca: Remove useless err == 0 condition On top of st21nfca_im_recv_atr_res_cb and st21nfca_im_recv_dep_res_cb a condition if (err != 0) is present. Because err is never modified in the code err will always be 0 at the end. The condition can be removed. Signed-off-by: Christophe Ricard Signed-off-by: Samuel Ortiz --- diff --git a/drivers/nfc/st21nfca/st21nfca_dep.c b/drivers/nfc/st21nfca/st21nfca_dep.c index cd942c5adc53..979c96986b34 100644 --- a/drivers/nfc/st21nfca/st21nfca_dep.c +++ b/drivers/nfc/st21nfca/st21nfca_dep.c @@ -485,8 +485,7 @@ static void st21nfca_im_recv_atr_res_cb(void *context, struct sk_buff *skb, ST21NFCA_PP2LRI(atr_res->ppi)); break; default: - if (err == 0) - kfree_skb(skb); + kfree_skb(skb); break; } } @@ -616,8 +615,7 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb, } exit: - if (err == 0) - kfree_skb(skb); + kfree_skb(skb); } int st21nfca_im_send_dep_req(struct nfc_hci_dev *hdev, struct sk_buff *skb)