hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/isdn/hardware/mISDN/mISDNipac.c
....@@ -1,23 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * isac.c ISAC specific routines
34 *
45 * Author Karsten Keil <keil@isdn4linux.de>
56 *
67 * Copyright 2009 by Karsten Keil <keil@isdn4linux.de>
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 version 2 as
10
- * published by the Free Software Foundation.
11
- *
12
- * This program is distributed in the hope that it will be useful,
13
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- * GNU General Public License for more details.
16
- *
17
- * You should have received a copy of the GNU General Public License
18
- * along with this program; if not, write to the Free Software
19
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20
- *
218 */
229
2310 #include <linux/irqreturn.h>
....@@ -203,8 +190,7 @@
203190 #endif
204191 }
205192 WriteISAC(isac, ISAC_CMDR, 0x80);
206
- if (isac->dch.rx_skb)
207
- dev_kfree_skb(isac->dch.rx_skb);
193
+ dev_kfree_skb(isac->dch.rx_skb);
208194 isac->dch.rx_skb = NULL;
209195 } else {
210196 count = ReadISAC(isac, ISAC_RBCL) & 0x1f;
....@@ -223,8 +209,7 @@
223209 if (isac->dch.tx_skb && isac->dch.tx_idx < isac->dch.tx_skb->len) {
224210 isac_fill_fifo(isac);
225211 } else {
226
- if (isac->dch.tx_skb)
227
- dev_kfree_skb(isac->dch.tx_skb);
212
+ dev_kfree_skb(isac->dch.tx_skb);
228213 if (get_next_dframe(&isac->dch))
229214 isac_fill_fifo(isac);
230215 }
....@@ -477,8 +462,7 @@
477462 isac->dch.err_crc++;
478463 #endif
479464 WriteISAC(isac, ISACX_CMDRD, ISACX_CMDRD_RMC);
480
- if (isac->dch.rx_skb)
481
- dev_kfree_skb(isac->dch.rx_skb);
465
+ dev_kfree_skb(isac->dch.rx_skb);
482466 isac->dch.rx_skb = NULL;
483467 } else {
484468 count = ReadISAC(isac, ISACX_RBCLD) & 0x1f;
....@@ -952,8 +936,8 @@
952936 hscx_cmdr(hscx, 0x80); /* RMC */
953937 if (hscx->bch.rx_skb)
954938 skb_trim(hscx->bch.rx_skb, 0);
955
- pr_warning("%s.B%d: No bufferspace for %d bytes\n",
956
- hscx->ip->name, hscx->bch.nr, count);
939
+ pr_warn("%s.B%d: No bufferspace for %d bytes\n",
940
+ hscx->ip->name, hscx->bch.nr, count);
957941 return;
958942 }
959943 p = skb_put(hscx->bch.rx_skb, count);
....@@ -1025,8 +1009,7 @@
10251009 if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) {
10261010 hscx_fill_fifo(hx);
10271011 } else {
1028
- if (hx->bch.tx_skb)
1029
- dev_kfree_skb(hx->bch.tx_skb);
1012
+ dev_kfree_skb(hx->bch.tx_skb);
10301013 if (get_next_bframe(&hx->bch)) {
10311014 hscx_fill_fifo(hx);
10321015 test_and_clear_bit(FLG_TX_EMPTY, &hx->bch.Flags);