Skip to content

Commit 652b0ae

Browse files
Alexander Aringteigland
authored andcommitted
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: 94e180d ("dlm: async freeing of lockspace resources") Reported-by: kernel test robot <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202408110800.OsoP8TB9-lkp@intel.com/ Signed-off-by: Alexander Aring <aahringo@redhat.com> Signed-off-by: David Teigland <teigland@redhat.com>
1 parent fb1911e commit 652b0ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fs/dlm/main.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,10 @@ static int __init init_dlm(void)
5353
goto out_user;
5454

5555
dlm_wq = alloc_workqueue("dlm_wq", 0, 0);
56-
if (!dlm_wq)
56+
if (!dlm_wq) {
57+
error = -ENOMEM;
5758
goto out_plock;
59+
}
5860

5961
printk("DLM installed\n");
6062

0 commit comments

Comments
 (0)