From 652b0ae675fede81420758e3af7c5174cdaa8404 Mon Sep 17 00:00:00 2001 From: Alexander Aring Date: Mon, 12 Aug 2024 16:14:24 -0400 Subject: [PATCH] dlm: add missing -ENOMEM if alloc_workqueue() fails This patch sets an missing -ENOMEM as error return value when the allocation of the dlm workqueue fails. Fixes: 94e180d6255f ("dlm: async freeing of lockspace resources") Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202408110800.OsoP8TB9-lkp@intel.com/ Signed-off-by: Alexander Aring Signed-off-by: David Teigland --- fs/dlm/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/dlm/main.c b/fs/dlm/main.c index cb15db8ba9bf..4887c8a05318 100644 --- a/fs/dlm/main.c +++ b/fs/dlm/main.c @@ -53,8 +53,10 @@ static int __init init_dlm(void) goto out_user; dlm_wq = alloc_workqueue("dlm_wq", 0, 0); - if (!dlm_wq) + if (!dlm_wq) { + error = -ENOMEM; goto out_plock; + } printk("DLM installed\n");