From 56249998b25f602f8dedbe916ec5494b71da113d Mon Sep 17 00:00:00 2001 From: Mike Marshall Date: Thu, 18 Oct 2018 13:47:16 -0400 Subject: [PATCH] orangefs: don't let orangefs_new_inode return NULL Suggested by Dan Carpenter Signed-off-by: Mike Marshall --- fs/orangefs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/orangefs/inode.c b/fs/orangefs/inode.c index 31932879b716..c1b4ce399ab7 100644 --- a/fs/orangefs/inode.c +++ b/fs/orangefs/inode.c @@ -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 */