dm-lc.c: return -ENOMEM if alloc_workqueue fails
PATCH 1/1 dm-lc.c: return -ENOMEM if alloc_workqueue fails
Audit the return value of alloc_workqueue and return -ENOMEM if it fails
Signed-off-by Kumar Amit Mehta <[email protected]>
--- Driver/dm-lc.c | 2 ++ 1 file changed, 2 insertions(+)
Driver/dm-lc.c +2 -0
@@ -2963,6 +2963,8 @@ static int __init lc_module_init(void) safe_io_wq =alloc_workqueue ("safeiowq" ,WQ_NON_REENTRANT |WQ_MEM_RECLAIM ,0 ); +if (!safe_io_wq) +return -ENOMEM ; lc_io_client =dm_io_client_create ();
Signature · 1 line
1.8.3.1
Kumar,
Thanks for your patch, applied.
Akira
Quoted 21 lines · Kumar Amit Mehta
Audit the return value of
alloc_workqueueand return-ENOMEMif it failsSigned-off-by Kumar Amit Mehta <[email protected]>--- Driver/dm-lc.c | 2 ++ 1 file changed, 2 insertions(+)Driver/dm-lc.c +2
-0@@ -2963,6 +2963,8 @@ static int __init lc_module_init(void) safe_io_wq =alloc_workqueue ("safeiowq" ,WQ_NON_REENTRANT |WQ_MEM_RECLAIM ,0 ); +if (!safe_io_wq) +return -ENOMEM ; lc_io_client =dm_io_client_create ();