Commit cb4a907
net: mana: Init link_change_work before potential error paths in probe
Move INIT_WORK(link_change_work) to right after the mana_context
allocation, before any error path that could reach mana_remove().
Previously, if mana_create_eq() or mana_query_device_cfg() failed,
mana_probe() would jump to the error path which calls mana_remove().
mana_remove() unconditionally calls disable_work_sync(link_change_work),
but the work struct had not been initialized yet. This can trigger
CONFIG_DEBUG_OBJECTS_WORK enabled.
Fixes: 54133f9 ("net: mana: Support HW link state events")
Signed-off-by: Erni Sri Satya Vennela <ernis@linux.microsoft.com>
Link: https://patch.msgid.link/20260420124741.1056179-2-ernis@linux.microsoft.com
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>1 parent 7079c8c commit cb4a907
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3631 | 3631 | | |
3632 | 3632 | | |
3633 | 3633 | | |
| 3634 | + | |
| 3635 | + | |
3634 | 3636 | | |
3635 | 3637 | | |
3636 | 3638 | | |
| |||
3648 | 3650 | | |
3649 | 3651 | | |
3650 | 3652 | | |
3651 | | - | |
3652 | | - | |
3653 | 3653 | | |
3654 | 3654 | | |
3655 | 3655 | | |
| |||
0 commit comments