forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-11 04dd17822334871b23ea2862f7798fb0e0007777
kernel/drivers/net/hamradio/hdlcdrv.c
....@@ -1,23 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*****************************************************************************/
23
34 /*
45 * hdlcdrv.c -- HDLC packet radio network driver.
56 *
67 * Copyright (C) 1996-2000 Thomas Sailer (sailer@ife.ee.ethz.ch)
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation; either version 2 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program; if not, write to the Free Software
20
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
218 *
229 * Please note that the GPL allows you to use the driver, NOT the radio.
2310 * In order to use the radio, you need a license from the communications
....@@ -488,8 +475,7 @@
488475
489476 if (s->ops && s->ops->close)
490477 i = s->ops->close(dev);
491
- if (s->skb)
492
- dev_kfree_skb(s->skb);
478
+ dev_kfree_skb(s->skb);
493479 s->skb = NULL;
494480 s->opened = 0;
495481 return i;
....@@ -700,8 +686,6 @@
700686 struct net_device *dev;
701687 struct hdlcdrv_state *s;
702688 int err;
703
-
704
- BUG_ON(ops == NULL);
705689
706690 if (privsize < sizeof(struct hdlcdrv_state))
707691 privsize = sizeof(struct hdlcdrv_state);