From patchwork Sat Jul 31 20:26:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 116233 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6VKQui0001189 for ; Sat, 31 Jul 2010 20:26:56 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754469Ab0GaU0z (ORCPT ); Sat, 31 Jul 2010 16:26:55 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:42306 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752391Ab0GaU0z (ORCPT ); Sat, 31 Jul 2010 16:26:55 -0400 Received: by wwj40 with SMTP id 40so2640630wwj.1 for ; Sat, 31 Jul 2010 13:26:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=dmjHfrHO45Uq3+OQ7lDcoy7W7fAx1Z4H0fONbJorYtw=; b=XkGkQEilCJHoEelcuR363qzYvSU8/bxw2xoalUZCSYXFbiX1WyqLYttwQmVNPqvKf7 UvJ9Tk3BwJyMUeY1SUboJNkqPKqncR4ybJ00XtWdvSM5YFSmWj65o/UtHddioWpX/Nez Xr2MHzUoRBLOdOK/cGzufwL8ClBjXn8whu0C0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=VEFXlpitTYntP5H0kIgQ/8bAEc+Nfjpx5pHSLaSJuRJsxRmekF6HZt/kRQmhLKmt1b Xl9Pn5FGSjUGCw39BkDoJcGZBUmeEHTasxZ1O7WdUNMwfcp8+am0jlAkxYxtEnHkK+22 ogcrRhxVkmtY/ebmjDlvDLVNqMHTQXyqqBx3w= Received: by 10.216.145.199 with SMTP id p49mr1028410wej.18.1280608013873; Sat, 31 Jul 2010 13:26:53 -0700 (PDT) Received: from bicker ([205.177.176.130]) by mx.google.com with ESMTPS id p42sm1924134weq.12.2010.07.31.13.26.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 31 Jul 2010 13:26:53 -0700 (PDT) Date: Sat, 31 Jul 2010 22:26:31 +0200 From: Dan Carpenter To: Sage Weil Cc: Yehuda Sadeh , ceph-devel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch] ceph: create_workqueue() doesn't return ERR_PTR Message-ID: <20100731202631.GH26313@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: ceph-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: ceph-devel@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Sat, 31 Jul 2010 20:26:56 +0000 (UTC) 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; }