提交 d96c9043 编写于 作者: S Sage Weil

ceph: fix msgr_init error path

create_workqueue() returns NULL on failure.
Signed-off-by: NSage Weil <sage@newdream.net>
上级 1cd275f6
......@@ -97,11 +97,9 @@ struct workqueue_struct *ceph_msgr_wq;
int ceph_msgr_init(void)
{
ceph_msgr_wq = create_workqueue("ceph-msgr");
if (IS_ERR(ceph_msgr_wq)) {
int ret = PTR_ERR(ceph_msgr_wq);
pr_err("msgr_init failed to create workqueue: %d\n", ret);
ceph_msgr_wq = NULL;
return ret;
if (!ceph_msgr_wq) {
pr_err("msgr_init failed to create workqueue\n");
return -ENOMEM;
}
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册