From patchwork Sun Jul 26 01:45:35 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhishek Kulkarni X-Patchwork-Id: 37377 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 n6Q1kKVE025537 for ; Sun, 26 Jul 2009 01:46:21 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1MUsoM-00088o-Eb; Sun, 26 Jul 2009 01:46:02 +0000 Received: from sfi-mx-3.v28.ch3.sourceforge.com ([172.29.28.123] helo=mx.sourceforge.net) by h25xhf1.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1MUsoL-00088i-6L for v9fs-developer@lists.sourceforge.net; Sun, 26 Jul 2009 01:46:01 +0000 X-ACL-Warn: Received: from rv-out-0708.google.com ([209.85.198.245]) by 3b2kzd1.ch3.sourceforge.com with esmtp (Exim 4.69) id 1MUsoB-0004su-IR for v9fs-developer@lists.sourceforge.net; Sun, 26 Jul 2009 01:46:01 +0000 Received: by rv-out-0708.google.com with SMTP id b17so606596rvf.22 for ; Sat, 25 Jul 2009 18:45:45 -0700 (PDT) Received: by 10.140.199.15 with SMTP id w15mr3149656rvf.147.1248572745061; Sat, 25 Jul 2009 18:45:45 -0700 (PDT) Received: from localhost.localdomain ([69.254.150.158]) by mx.google.com with ESMTPS id l31sm23591289rvb.14.2009.07.25.18.45.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sat, 25 Jul 2009 18:45:44 -0700 (PDT) From: Abhishek Kulkarni To: linux-kernel@vger.kernel.org Date: Sat, 25 Jul 2009 19:45:35 -0600 Message-Id: <1248572735-24099-1-git-send-email-adkulkar@umail.iu.edu> X-Mailer: git-send-email 1.6.0.4 X-Spam-Score: 0.0 (/) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. _SUMMARY_ X-Headers-End: 1MUsoB-0004su-IR Cc: v9fs-developer@lists.sourceforge.net Subject: [V9fs-developer] [PATCH] 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. --- :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;