]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
orangefs: don't let orangefs_new_inode return NULL
authorMike Marshall <hubcap@omnibond.com>
Thu, 18 Oct 2018 17:47:16 +0000 (13:47 -0400)
committerMike Marshall <hubcap@omnibond.com>
Thu, 18 Oct 2018 17:47:16 +0000 (13:47 -0400)
Suggested by Dan Carpenter

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/inode.c

index 31932879b7162d12e751aa27b3abfb837b98e90a..c1b4ce399ab79ff5a26e07df1204628236220bfd 100644 (file)
@@ -448,7 +448,7 @@ struct inode *orangefs_new_inode(struct super_block *sb, struct inode *dir,
 
        inode = new_inode(sb);
        if (!inode)
-               return NULL;
+               return ERR_PTR(-ENOMEM);
 
        orangefs_set_inode(inode, ref);
        inode->i_ino = hash;    /* needed for stat etc */