diff options
author | Yunbo Yu <yuyunbo519@gmail.com> | 2022-04-18 22:18:12 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-04-22 10:22:16 +0100 |
commit | f1ed409fb1eef7695c1ac84b109acf4b01a61399 (patch) | |
tree | d07f9f08f7bfff7a69fda0d3486952f9a605cde1 /drivers/net/usb | |
parent | f70925bf99406150d8133e775e49c9c459f78733 (diff) | |
download | linux-f1ed409fb1eef7695c1ac84b109acf4b01a61399.tar.bz2 |
net: cdc-ncm: Move spin_lock_bh() to spin_lock()
It is unnecessary to call spin_lock_bh() for you are already in a tasklet.
Signed-off-by: Yunbo Yu <yuyunbo519@gmail.com>
Acked-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb')
-rw-r--r-- | drivers/net/usb/cdc_ncm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 15f91d691bba..cdca00c0dc1f 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -1492,19 +1492,19 @@ static void cdc_ncm_txpath_bh(struct tasklet_struct *t) struct cdc_ncm_ctx *ctx = from_tasklet(ctx, t, bh); struct usbnet *dev = ctx->dev; - spin_lock_bh(&ctx->mtx); + spin_lock(&ctx->mtx); if (ctx->tx_timer_pending != 0) { ctx->tx_timer_pending--; cdc_ncm_tx_timeout_start(ctx); - spin_unlock_bh(&ctx->mtx); + spin_unlock(&ctx->mtx); } else if (dev->net != NULL) { ctx->tx_reason_timeout++; /* count reason for transmitting */ - spin_unlock_bh(&ctx->mtx); + spin_unlock(&ctx->mtx); netif_tx_lock_bh(dev->net); usbnet_start_xmit(NULL, dev->net); netif_tx_unlock_bh(dev->net); } else { - spin_unlock_bh(&ctx->mtx); + spin_unlock(&ctx->mtx); } } |