hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/rose/rose_route.c
....@@ -1,8 +1,5 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
2
- * This program is free software; you can redistribute it and/or modify
3
- * it under the terms of the GNU General Public License as published by
4
- * the Free Software Foundation; either version 2 of the License, or
5
- * (at your option) any later version.
63 *
74 * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk)
85 * Copyright (C) Terry Dawson VK2KTJ (terry@animats.net)
....@@ -230,8 +227,8 @@
230227 {
231228 struct rose_neigh *s;
232229
233
- rose_stop_ftimer(rose_neigh);
234
- rose_stop_t0timer(rose_neigh);
230
+ del_timer_sync(&rose_neigh->ftimer);
231
+ del_timer_sync(&rose_neigh->t0timer);
235232
236233 skb_queue_purge(&rose_neigh->queue);
237234
....@@ -346,7 +343,7 @@
346343 case 0:
347344 rose_node->neighbour[0] =
348345 rose_node->neighbour[1];
349
- /* fall through */
346
+ fallthrough;
350347 case 1:
351348 rose_node->neighbour[1] =
352349 rose_node->neighbour[2];
....@@ -508,7 +505,7 @@
508505 switch (i) {
509506 case 0:
510507 t->neighbour[0] = t->neighbour[1];
511
- /* fall through */
508
+ fallthrough;
512509 case 1:
513510 t->neighbour[1] = t->neighbour[2];
514511 case 2:
....@@ -616,6 +613,8 @@
616613 if (first == NULL || strncmp(dev->name, first->name, 3) < 0)
617614 first = dev;
618615 }
616
+ if (first)
617
+ dev_hold(first);
619618 rcu_read_unlock();
620619
621620 return first;
....@@ -699,7 +698,6 @@
699698 for (i = 0; i < node->count; i++) {
700699 if (!rose_ftimer_running(node->neighbour[i])) {
701700 res = node->neighbour[i];
702
- failed = 0;
703701 goto out;
704702 }
705703 failed = 1;