]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: mana: Init gf_stats_work before potential error paths in probe
authorErni Sri Satya Vennela <ernis@linux.microsoft.com>
Mon, 20 Apr 2026 12:47:36 +0000 (05:47 -0700)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 23 Apr 2026 10:49:13 +0000 (12:49 +0200)
commit6e8bc03349fe4f09567fa76235abf52bdaf83082
treec510b47e5aff41aa66d94cc0bc41e29f49c7411f
parentcb4a90744bcd1adf12f0d0c7c4f0dd2647444ec5
net: mana: Init gf_stats_work before potential error paths in probe

Move INIT_DELAYED_WORK(gf_stats_work) to before mana_create_eq(),
while keeping schedule_delayed_work() at its original location.

Previously, if any function between mana_create_eq() and the
INIT_DELAYED_WORK call failed, mana_probe() would call mana_remove()
which unconditionally calls cancel_delayed_work_sync(gf_stats_work)
in __flush_work() or debug object warnings with
CONFIG_DEBUG_OBJECTS_WORK enabled.

Fixes: be4f1d67ec56 ("net: mana: Add standard counter rx_missed_errors")
Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Link: https://patch.msgid.link/20260420124741.1056179-3-ernis@linux.microsoft.com
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microsoft/mana/mana_en.c