History

NFC: st21nfca: add missed kfree_skb() in an error path

st21nfca_tm_send_atr_res() misses to call kfree_skb() in an error path. Add the missed function call to fix it.

Chuhong Yuan committed 6 years ago

Commit 3decabd1 parent 96d10d51 file · +3 −1Browse files

Unified · Split

drivers/nfc/st21nfca/dep.c+3−1
@@ -173,8 +173,10 @@ static int st21nfca_tm_send_atr_res(struct nfc_hci_dev *hdev, · 172 unmodified lines
173 memcpy(atr_res->gbi, atr_req->gbi, gb_len);173 memcpy(atr_res->gbi, atr_req->gbi, gb_len);
174 r = nfc_set_remote_general_bytes(hdev->ndev, atr_res->gbi,174 r = nfc_set_remote_general_bytes(hdev->ndev, atr_res->gbi,
175 gb_len);175 gb_len);
176 if (r < 0)176 if (r < 0) {
177 kfree_skb(skb);
177 return r;178 return r;
179 }
178 }180 }
179 181
180 info->dep_info.curr_nfc_dep_pni = 0;182 info->dep_info.curr_nfc_dep_pni = 0;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t