aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netdevsim/netdev.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-08-21 09:02:28 +0200
committerTakashi Iwai <tiwai@suse.de>2025-08-21 09:02:28 +0200
commit279eb50aa8b6b6b69a57a2a7f0bba24dda44f102 (patch)
tree4e925cd39cf1feb7dd5e7c209794226d14f12fc9 /drivers/net/netdevsim/netdev.c
parentALSA: hda: tas2781: Fix wrong reference of tasdevice_priv (diff)
parentASoC: cs35l56: Fixes for CS35L63 for production (diff)
downloadlinux-279eb50aa8b6b6b69a57a2a7f0bba24dda44f102.tar.gz
linux-279eb50aa8b6b6b69a57a2a7f0bba24dda44f102.zip
Merge tag 'asoc-fix-v6.17-rc2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus
ASoC: Fixes for v6.17 A few fixes that came in during the past week, there's some updates for the CS35L56 which adjust the driver for production silicon and a fix for buggy resume of the ES9389.
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
-rw-r--r--drivers/net/netdevsim/netdev.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index 39fe28af48b9..0178219f0db5 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -710,9 +710,13 @@ static struct nsim_rq *nsim_queue_alloc(void)
static void nsim_queue_free(struct net_device *dev, struct nsim_rq *rq)
{
hrtimer_cancel(&rq->napi_timer);
- local_bh_disable();
- dev_dstats_rx_dropped_add(dev, rq->skb_queue.qlen);
- local_bh_enable();
+
+ if (rq->skb_queue.qlen) {
+ local_bh_disable();
+ dev_dstats_rx_dropped_add(dev, rq->skb_queue.qlen);
+ local_bh_enable();
+ }
+
skb_queue_purge_reason(&rq->skb_queue, SKB_DROP_REASON_QUEUE_PURGE);
kfree(rq);
}