summaryrefslogtreecommitdiffstats
path: root/net/ceph
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-12-13 20:30:28 -0800
committerSage Weil <sage@newdream.net>2010-12-13 20:30:28 -0800
commitd96c9043d1588f04c7f467167f653c07d83232d5 (patch)
treed4b68d2ee371db0287902cae2a27f37749e8e1c9 /net/ceph
parent1cd275f609ba46c8cae3ee77e499c54a0d13a983 (diff)
downloadop-kernel-dev-d96c9043d1588f04c7f467167f653c07d83232d5.zip
op-kernel-dev-d96c9043d1588f04c7f467167f653c07d83232d5.tar.gz
ceph: fix msgr_init error path
create_workqueue() returns NULL on failure. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'net/ceph')
-rw-r--r--net/ceph/messenger.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 1c7a2ec..b6ff4a1 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -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;
}
OpenPOWER on IntegriCloud