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 <christophe-h.ricard@st.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Christophe Ricard 2014-08-11 00:04:53 +02:00 committed by Samuel Ortiz
parent 72030a2eeb
commit 32b41d8f75
1 changed files with 2 additions and 4 deletions

View File

@ -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)