mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-16 16:54:20 +08:00
NFC: st21nfca: Remove useless IS_ERR(skb) conditions
skb is already verified to be not null from the below hci layer. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
parent
32b41d8f75
commit
a51577c9e3
@ -198,10 +198,6 @@ static int st21nfca_tm_recv_atr_req(struct nfc_hci_dev *hdev,
|
||||
int r;
|
||||
|
||||
skb_trim(skb, skb->len - 1);
|
||||
if (IS_ERR(skb)) {
|
||||
r = PTR_ERR(skb);
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!skb->len) {
|
||||
r = -EIO;
|
||||
@ -281,11 +277,6 @@ static int st21nfca_tm_recv_psl_req(struct nfc_hci_dev *hdev,
|
||||
int r;
|
||||
|
||||
skb_trim(skb, skb->len - 1);
|
||||
if (IS_ERR(skb)) {
|
||||
r = PTR_ERR(skb);
|
||||
skb = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (!skb->len) {
|
||||
r = -EIO;
|
||||
@ -331,11 +322,6 @@ static int st21nfca_tm_recv_dep_req(struct nfc_hci_dev *hdev,
|
||||
struct st21nfca_hci_info *info = nfc_hci_get_clientdata(hdev);
|
||||
|
||||
skb_trim(skb, skb->len - 1);
|
||||
if (IS_ERR(skb)) {
|
||||
r = PTR_ERR(skb);
|
||||
skb = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
size = 4;
|
||||
|
||||
@ -369,12 +355,6 @@ static int st21nfca_tm_recv_dep_req(struct nfc_hci_dev *hdev,
|
||||
break;
|
||||
}
|
||||
|
||||
if (IS_ERR(skb)) {
|
||||
r = PTR_ERR(skb);
|
||||
skb = NULL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
skb_pull(skb, size);
|
||||
|
||||
return nfc_tm_data_received(hdev->ndev, skb);
|
||||
|
Loading…
Reference in New Issue
Block a user