* [patch] ceph: create_workqueue() doesn't return ERR_PTR
@ 2010-07-31 20:26 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2010-07-31 20:26 UTC (permalink / raw)
To: Sage Weil; +Cc: Yehuda Sadeh, ceph-devel, kernel-janitors
create_workqueue() returns a NULL pointer on errors.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/fs/ceph/messenger.c b/fs/ceph/messenger.c
index 15167b2..d959dba 100644
--- a/fs/ceph/messenger.c
+++ b/fs/ceph/messenger.c
@@ -94,11 +94,9 @@ struct workqueue_struct *ceph_msgr_wq;
int __init 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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2010-07-31 20:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-31 20:26 [patch] ceph: create_workqueue() doesn't return ERR_PTR Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).