Commit d96c9043 authored by Sage Weil's avatar Sage Weil

ceph: fix msgr_init error path

create_workqueue() returns NULL on failure.
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 1cd275f6
...@@ -97,11 +97,9 @@ struct workqueue_struct *ceph_msgr_wq; ...@@ -97,11 +97,9 @@ struct workqueue_struct *ceph_msgr_wq;
int ceph_msgr_init(void) int ceph_msgr_init(void)
{ {
ceph_msgr_wq = create_workqueue("ceph-msgr"); ceph_msgr_wq = create_workqueue("ceph-msgr");
if (IS_ERR(ceph_msgr_wq)) { if (!ceph_msgr_wq) {
int ret = PTR_ERR(ceph_msgr_wq); pr_err("msgr_init failed to create workqueue\n");
pr_err("msgr_init failed to create workqueue: %d\n", ret); return -ENOMEM;
ceph_msgr_wq = NULL;
return ret;
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment