aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe Ricard <christophe.ricard@gmail.com>2015-01-25 17:33:26 -0500
committerSamuel Ortiz <sameo@linux.intel.com>2015-01-26 17:14:34 -0500
commitec03ff1a8f9a9e065fe905dd34078d272d8de6ea (patch)
tree3f3bce4a77e68bd7076b622c8ef17fb816e1bce5
parent511e78a38aa611f1bcc1f9b383766ad3e35816c0 (diff)
NFC: st21nfca: Remove skb_pipe_list and skb_pipe_info useless allocation
skb_pipe_list and skb_pipe_info are allocated in nfc_hci_send_cmd. alloc_skb on those buffer are then useless. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
-rw-r--r--drivers/nfc/st21nfca/st21nfca.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/nfc/st21nfca/st21nfca.c b/drivers/nfc/st21nfca/st21nfca.c
index 880193b4a053..0667272cca98 100644
--- a/drivers/nfc/st21nfca/st21nfca.c
+++ b/drivers/nfc/st21nfca/st21nfca.c
@@ -118,18 +118,6 @@ static int st21nfca_hci_load_session(struct nfc_hci_dev *hdev)
118 NFC_HCI_TERMINAL_HOST_ID, 0 118 NFC_HCI_TERMINAL_HOST_ID, 0
119 }; 119 };
120 120
121 skb_pipe_list = alloc_skb(ST21NFCA_HCI_LLC_MAX_SIZE, GFP_KERNEL);
122 if (!skb_pipe_list) {
123 r = -ENOMEM;
124 goto free_list;
125 }
126
127 skb_pipe_info = alloc_skb(ST21NFCA_HCI_LLC_MAX_SIZE, GFP_KERNEL);
128 if (!skb_pipe_info) {
129 r = -ENOMEM;
130 goto free_info;
131 }
132
133 /* On ST21NFCA device pipes number are dynamics 121 /* On ST21NFCA device pipes number are dynamics
134 * A maximum of 16 pipes can be created at the same time 122 * A maximum of 16 pipes can be created at the same time
135 * If pipes are already created, hci_dev_up will fail. 123 * If pipes are already created, hci_dev_up will fail.
@@ -212,7 +200,6 @@ static int st21nfca_hci_load_session(struct nfc_hci_dev *hdev)
212 memcpy(hdev->init_data.gates, st21nfca_gates, sizeof(st21nfca_gates)); 200 memcpy(hdev->init_data.gates, st21nfca_gates, sizeof(st21nfca_gates));
213free_info: 201free_info:
214 kfree_skb(skb_pipe_info); 202 kfree_skb(skb_pipe_info);
215free_list:
216 kfree_skb(skb_pipe_list); 203 kfree_skb(skb_pipe_list);
217 return r; 204 return r;
218} 205}