From patchwork Wed Jul 29 19:49:01 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Kulkarni X-Patchwork-Id: 38216 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6TJtJIC020766 for ; Wed, 29 Jul 2009 19:55:20 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by 335xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1MWFEr-0002iv-Pn; Wed, 29 Jul 2009 19:55:01 +0000 Received: from sfi-mx-4.v28.ch3.sourceforge.com ([172.29.28.124] helo=mx.sourceforge.net) by 335xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1MWFEr-0002hn-8R for v9fs-developer@lists.sourceforge.net; Wed, 29 Jul 2009 19:55:01 +0000 X-ACL-Warn: Received: from mail-pz0-f180.google.com ([209.85.222.180]) by 1b2kzd1.ch3.sourceforge.com with esmtp (Exim 4.69) id 1MWFEl-0003sq-DD for v9fs-developer@lists.sourceforge.net; Wed, 29 Jul 2009 19:54:56 +0000 Received: by pzk10 with SMTP id 10so11849pzk.28 for ; Wed, 29 Jul 2009 12:54:49 -0700 (PDT) Received: by 10.140.191.3 with SMTP id o3mr163449rvf.91.1248896952159; Wed, 29 Jul 2009 12:49:12 -0700 (PDT) Received: from localhost.localdomain (y-130-55-115-47.lanl.gov [130.55.115.47]) by mx.google.com with ESMTPS id g14sm4027967rvb.30.2009.07.29.12.49.10 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 29 Jul 2009 12:49:11 -0700 (PDT) From: Abhishek Kulkarni To: v9fs-developer@lists.sourceforge.net Date: Wed, 29 Jul 2009 13:49:01 -0600 Message-Id: <1248896942-13027-1-git-send-email-adkulkar@umail.iu.edu> X-Mailer: git-send-email 1.6.3.3 X-Spam-Score: 0.7 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. 1.4 NO_DNS_FOR_FROM DNS: Envelope sender has no MX or A DNS records -0.7 AWL AWL: From: address is in the auto white-list X-Headers-End: 1MWFEl-0003sq-DD Cc: linux-kernel@vger.kernel.org Subject: [V9fs-developer] [RESEND 1/2] 9p: Add missing cast for the error return value in v9fs_get_inode X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: v9fs-developer-bounces@lists.sourceforge.net Cast the error return value (ENOMEM) in v9fs_get_inode() to its correct type using ERR_PTR. Signed-off-by: Abhishek Kulkarni --- :100644 100644 fac30d2... 06a223d... M fs/9p/vfs_inode.c fs/9p/vfs_inode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index fac30d2..06a223d 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c @@ -215,7 +215,7 @@ struct inode *v9fs_get_inode(struct super_block *sb, int mode) inode = new_inode(sb); if (!inode) { P9_EPRINTK(KERN_WARNING, "Problem allocating inode\n"); - return -ENOMEM; + return ERR_PTR(-ENOMEM); } inode->i_mode = mode;