Skip to content

Commit db24343

Browse files
Yang Yingliangkuba-moo
authored andcommitted
amt: fix error return code in amt_init()
Return error code when alloc_workqueue() fails in amt_init(). Reported-by: Hulk Robot <[email protected]> Signed-off-by: Yang Yingliang <[email protected]> Reviewed-by: Taehee Yoo <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 18635d5 commit db24343

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/net/amt.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3259,8 +3259,10 @@ static int __init amt_init(void)
32593259
goto unregister_notifier;
32603260

32613261
amt_wq = alloc_workqueue("amt", WQ_UNBOUND, 1);
3262-
if (!amt_wq)
3262+
if (!amt_wq) {
3263+
err = -ENOMEM;
32633264
goto rtnl_unregister;
3265+
}
32643266

32653267
spin_lock_init(&source_gc_lock);
32663268
spin_lock_bh(&source_gc_lock);

0 commit comments

Comments
 (0)