diff options
| author | Christophe Ricard <christophe.ricard@gmail.com> | 2014-08-10 18:04:53 -0400 |
|---|---|---|
| committer | Samuel Ortiz <sameo@linux.intel.com> | 2014-09-07 18:04:22 -0400 |
| commit | 32b41d8f7587b6e8a2cbb3a15f83c3a9687f1f17 (patch) | |
| tree | 1b2987968a9970a981bc586e0a5dc8fb9a1b17aa /drivers/nfc | |
| parent | 72030a2eeb182575f1bf2383f1e9267d4a6ece61 (diff) | |
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>
Diffstat (limited to 'drivers/nfc')
| -rw-r--r-- | drivers/nfc/st21nfca/st21nfca_dep.c | 6 |
1 files changed, 2 insertions, 4 deletions
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, | |||
| 485 | ST21NFCA_PP2LRI(atr_res->ppi)); | 485 | ST21NFCA_PP2LRI(atr_res->ppi)); |
| 486 | break; | 486 | break; |
| 487 | default: | 487 | default: |
| 488 | if (err == 0) | 488 | kfree_skb(skb); |
| 489 | kfree_skb(skb); | ||
| 490 | break; | 489 | break; |
| 491 | } | 490 | } |
| 492 | } | 491 | } |
| @@ -616,8 +615,7 @@ static void st21nfca_im_recv_dep_res_cb(void *context, struct sk_buff *skb, | |||
| 616 | } | 615 | } |
| 617 | 616 | ||
| 618 | exit: | 617 | exit: |
| 619 | if (err == 0) | 618 | kfree_skb(skb); |
| 620 | kfree_skb(skb); | ||
| 621 | } | 619 | } |
| 622 | 620 | ||
| 623 | int st21nfca_im_send_dep_req(struct nfc_hci_dev *hdev, struct sk_buff *skb) | 621 | int st21nfca_im_send_dep_req(struct nfc_hci_dev *hdev, struct sk_buff *skb) |
