summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-04-04 11:44:33 -0400
committerMike Snitzer <snitzer@kernel.org>2023-04-11 12:01:01 -0400
commit990f61e43c4d3235486707568edf59d67488a575 (patch)
treee117f460e6bfcb0569b97aba8519c7b366d21d19 /drivers/md
parentb362c733ed7bf312ed729847bc26ba89febc556e (diff)
dm mirror: add DMERR message if alloc_workqueue fails
Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-raid1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c
index 3e947655746c..4b2b40f81a1d 100644
--- a/drivers/md/dm-raid1.c
+++ b/drivers/md/dm-raid1.c
@@ -1501,8 +1501,10 @@ static int __init dm_mirror_init(void)
int r;
dm_raid1_wq = alloc_workqueue("dm_raid1_wq", 0, 0);
- if (!dm_raid1_wq)
+ if (!dm_raid1_wq) {
+ DMERR("Failed to alloc workqueue");
return -ENOMEM;
+ }
r = dm_register_target(&mirror_target);
if (r < 0) {