hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/nfc/st-nci/ndlc.c
....@@ -1,19 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Low Level Transport (NDLC) Driver for STMicroelectronics NFC Chip
34 *
45 * Copyright (C) 2014-2015 STMicroelectronics SAS. All rights reserved.
5
- *
6
- * This program is free software; you can redistribute it and/or modify it
7
- * under the terms and conditions of the GNU General Public License,
8
- * version 2, as published by the Free Software Foundation.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
176 */
187
198 #include <linux/sched.h>
....@@ -297,13 +286,15 @@
297286
298287 void ndlc_remove(struct llt_ndlc *ndlc)
299288 {
300
- st_nci_remove(ndlc->ndev);
301
-
302289 /* cancel timers */
303290 del_timer_sync(&ndlc->t1_timer);
304291 del_timer_sync(&ndlc->t2_timer);
305292 ndlc->t2_active = false;
306293 ndlc->t1_active = false;
294
+ /* cancel work */
295
+ cancel_work_sync(&ndlc->sm_work);
296
+
297
+ st_nci_remove(ndlc->ndev);
307298
308299 skb_queue_purge(&ndlc->rcv_q);
309300 skb_queue_purge(&ndlc->send_q);