From: Abhishek Kulkarni Date: Mon, 17 Aug 2009 21:32:18 +0000 (-0500) Subject: 9p: Add missing cast for the error return value in v9fs_get_inode X-Git-Tag: v2.6.31-rc8~6^2~3 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=48559b4c30708ebdc849483da9fb83ee08c6c908;p=linux.git 9p: Add missing cast for the error return value in v9fs_get_inode Cast the error return value (ENOMEM) in v9fs_get_inode() to its correct type using ERR_PTR. Signed-off-by: Abhishek Kulkarni Signed-off-by: Eric Van Hensbergen --- diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index fac30d21851f..06a223d50a81 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;