hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/net/rose/rose_link.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 */
....@@ -239,6 +236,9 @@
239236 unsigned char *dptr;
240237 int len;
241238
239
+ if (!neigh->dev)
240
+ return;
241
+
242242 len = AX25_BPQ_HEADER_LEN + AX25_MAX_HEADER_LEN + ROSE_MIN_LEN + 3;
243243
244244 if ((skb = alloc_skb(len, GFP_ATOMIC)) == NULL)