Skip to content

Commit

Permalink
9p: Add missing cast for the error return value in v9fs_get_inode
Browse files Browse the repository at this point in the history
Cast the error return value (ENOMEM) in v9fs_get_inode() to its
correct type using ERR_PTR.

Signed-off-by: Abhishek Kulkarni <adkulkar@umail.iu.edu>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
  • Loading branch information
Abhishek Kulkarni authored and Eric Van Hensbergen committed Aug 17, 2009
1 parent 4d3297c commit 48559b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 48559b4

Please sign in to comment.