| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * isac.c ISAC specific routines |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Author Karsten Keil <keil@isdn4linux.de> |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * 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 | | - * |
|---|
| 21 | 8 | */ |
|---|
| 22 | 9 | |
|---|
| 23 | 10 | #include <linux/irqreturn.h> |
|---|
| .. | .. |
|---|
| 203 | 190 | #endif |
|---|
| 204 | 191 | } |
|---|
| 205 | 192 | 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); |
|---|
| 208 | 194 | isac->dch.rx_skb = NULL; |
|---|
| 209 | 195 | } else { |
|---|
| 210 | 196 | count = ReadISAC(isac, ISAC_RBCL) & 0x1f; |
|---|
| .. | .. |
|---|
| 223 | 209 | if (isac->dch.tx_skb && isac->dch.tx_idx < isac->dch.tx_skb->len) { |
|---|
| 224 | 210 | isac_fill_fifo(isac); |
|---|
| 225 | 211 | } else { |
|---|
| 226 | | - if (isac->dch.tx_skb) |
|---|
| 227 | | - dev_kfree_skb(isac->dch.tx_skb); |
|---|
| 212 | + dev_kfree_skb(isac->dch.tx_skb); |
|---|
| 228 | 213 | if (get_next_dframe(&isac->dch)) |
|---|
| 229 | 214 | isac_fill_fifo(isac); |
|---|
| 230 | 215 | } |
|---|
| .. | .. |
|---|
| 477 | 462 | isac->dch.err_crc++; |
|---|
| 478 | 463 | #endif |
|---|
| 479 | 464 | 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); |
|---|
| 482 | 466 | isac->dch.rx_skb = NULL; |
|---|
| 483 | 467 | } else { |
|---|
| 484 | 468 | count = ReadISAC(isac, ISACX_RBCLD) & 0x1f; |
|---|
| .. | .. |
|---|
| 952 | 936 | hscx_cmdr(hscx, 0x80); /* RMC */ |
|---|
| 953 | 937 | if (hscx->bch.rx_skb) |
|---|
| 954 | 938 | 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); |
|---|
| 957 | 941 | return; |
|---|
| 958 | 942 | } |
|---|
| 959 | 943 | p = skb_put(hscx->bch.rx_skb, count); |
|---|
| .. | .. |
|---|
| 1025 | 1009 | if (hx->bch.tx_skb && hx->bch.tx_idx < hx->bch.tx_skb->len) { |
|---|
| 1026 | 1010 | hscx_fill_fifo(hx); |
|---|
| 1027 | 1011 | } else { |
|---|
| 1028 | | - if (hx->bch.tx_skb) |
|---|
| 1029 | | - dev_kfree_skb(hx->bch.tx_skb); |
|---|
| 1012 | + dev_kfree_skb(hx->bch.tx_skb); |
|---|
| 1030 | 1013 | if (get_next_bframe(&hx->bch)) { |
|---|
| 1031 | 1014 | hscx_fill_fifo(hx); |
|---|
| 1032 | 1015 | test_and_clear_bit(FLG_TX_EMPTY, &hx->bch.Flags); |
|---|