| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 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. |
|---|
| 6 | 3 | * |
|---|
| 7 | 4 | * Copyright (C) Jonathan Naylor G4KLX (g4klx@g4klx.demon.co.uk) |
|---|
| 8 | 5 | * Copyright (C) Terry Dawson VK2KTJ (terry@animats.net) |
|---|
| .. | .. |
|---|
| 230 | 227 | { |
|---|
| 231 | 228 | struct rose_neigh *s; |
|---|
| 232 | 229 | |
|---|
| 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); |
|---|
| 235 | 232 | |
|---|
| 236 | 233 | skb_queue_purge(&rose_neigh->queue); |
|---|
| 237 | 234 | |
|---|
| .. | .. |
|---|
| 346 | 343 | case 0: |
|---|
| 347 | 344 | rose_node->neighbour[0] = |
|---|
| 348 | 345 | rose_node->neighbour[1]; |
|---|
| 349 | | - /* fall through */ |
|---|
| 346 | + fallthrough; |
|---|
| 350 | 347 | case 1: |
|---|
| 351 | 348 | rose_node->neighbour[1] = |
|---|
| 352 | 349 | rose_node->neighbour[2]; |
|---|
| .. | .. |
|---|
| 508 | 505 | switch (i) { |
|---|
| 509 | 506 | case 0: |
|---|
| 510 | 507 | t->neighbour[0] = t->neighbour[1]; |
|---|
| 511 | | - /* fall through */ |
|---|
| 508 | + fallthrough; |
|---|
| 512 | 509 | case 1: |
|---|
| 513 | 510 | t->neighbour[1] = t->neighbour[2]; |
|---|
| 514 | 511 | case 2: |
|---|
| .. | .. |
|---|
| 616 | 613 | if (first == NULL || strncmp(dev->name, first->name, 3) < 0) |
|---|
| 617 | 614 | first = dev; |
|---|
| 618 | 615 | } |
|---|
| 616 | + if (first) |
|---|
| 617 | + dev_hold(first); |
|---|
| 619 | 618 | rcu_read_unlock(); |
|---|
| 620 | 619 | |
|---|
| 621 | 620 | return first; |
|---|
| .. | .. |
|---|
| 699 | 698 | for (i = 0; i < node->count; i++) { |
|---|
| 700 | 699 | if (!rose_ftimer_running(node->neighbour[i])) { |
|---|
| 701 | 700 | res = node->neighbour[i]; |
|---|
| 702 | | - failed = 0; |
|---|
| 703 | 701 | goto out; |
|---|
| 704 | 702 | } |
|---|
| 705 | 703 | failed = 1; |
|---|