hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/isdn/hardware/mISDN/w6692.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * w6692.c mISDN driver for Winbond w6692 based cards
34 *
....@@ -5,20 +6,6 @@
56 * based on the w6692 I4L driver from Petr Novak <petr.novak@i.cz>
67 *
78 * Copyright 2009 by Karsten Keil <keil@isdn4linux.de>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License version 2 as
11
- * published by the Free Software Foundation.
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.
21
- *
229 */
2310
2411 #include <linux/interrupt.h>
....@@ -369,8 +356,7 @@
369356 card->dch.err_rx++;
370357 #endif
371358 }
372
- if (card->dch.rx_skb)
373
- dev_kfree_skb(card->dch.rx_skb);
359
+ dev_kfree_skb(card->dch.rx_skb);
374360 card->dch.rx_skb = NULL;
375361 WriteW6692(card, W_D_CMDR, W_D_CMDR_RACK | W_D_CMDR_RRST);
376362 } else {
....@@ -389,8 +375,7 @@
389375 if (card->dch.tx_skb && card->dch.tx_idx < card->dch.tx_skb->len) {
390376 W6692_fill_Dfifo(card);
391377 } else {
392
- if (card->dch.tx_skb)
393
- dev_kfree_skb(card->dch.tx_skb);
378
+ dev_kfree_skb(card->dch.tx_skb);
394379 if (get_next_dframe(&card->dch))
395380 W6692_fill_Dfifo(card);
396381 }
....@@ -481,8 +466,8 @@
481466 WriteW6692B(wch, W_B_CMDR, W_B_CMDR_RACK | W_B_CMDR_RACT);
482467 if (wch->bch.rx_skb)
483468 skb_trim(wch->bch.rx_skb, 0);
484
- pr_warning("%s.B%d: No bufferspace for %d bytes\n",
485
- card->name, wch->bch.nr, count);
469
+ pr_warn("%s.B%d: No bufferspace for %d bytes\n",
470
+ card->name, wch->bch.nr, count);
486471 return;
487472 }
488473 ptr = skb_put(wch->bch.rx_skb, count);
....@@ -649,8 +634,7 @@
649634 if (wch->bch.tx_skb && wch->bch.tx_idx < wch->bch.tx_skb->len) {
650635 W6692_fill_Bfifo(wch);
651636 } else {
652
- if (wch->bch.tx_skb)
653
- dev_kfree_skb(wch->bch.tx_skb);
637
+ dev_kfree_skb(wch->bch.tx_skb);
654638 if (get_next_bframe(&wch->bch)) {
655639 W6692_fill_Bfifo(wch);
656640 test_and_clear_bit(FLG_TX_EMPTY, &wch->bch.Flags);
....@@ -745,8 +729,8 @@
745729 wch->bch.nr, star);
746730 }
747731 if (star & W_B_STAR_XDOW) {
748
- pr_warning("%s: B%d XDOW proto=%x\n", card->name,
749
- wch->bch.nr, wch->bch.state);
732
+ pr_warn("%s: B%d XDOW proto=%x\n", card->name,
733
+ wch->bch.nr, wch->bch.state);
750734 #ifdef ERROR_STATISTIC
751735 wch->bch.err_xdu++;
752736 #endif
....@@ -763,8 +747,8 @@
763747 return; /* handle XDOW only once */
764748 }
765749 if (stat & W_B_EXI_XDUN) {
766
- pr_warning("%s: B%d XDUN proto=%x\n", card->name,
767
- wch->bch.nr, wch->bch.state);
750
+ pr_warn("%s: B%d XDUN proto=%x\n", card->name,
751
+ wch->bch.nr, wch->bch.state);
768752 #ifdef ERROR_STATISTIC
769753 wch->bch.err_xdu++;
770754 #endif