From: Dan Carpenter <error27@gmail.com>
To: Sage Weil <sage@newdream.net>
Cc: Yehuda Sadeh <yehuda@hq.newdream.net>,
ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch] ceph: create_workqueue() doesn't return ERR_PTR
Date: Sat, 31 Jul 2010 20:26:31 +0000 [thread overview]
Message-ID: <20100731202631.GH26313@bicker> (raw)
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;
}
reply other threads:[~2010-07-31 20:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100731202631.GH26313@bicker \
--to=error27@gmail.com \
--cc=ceph-devel@vger.kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=sage@newdream.net \
--cc=yehuda@hq.newdream.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox