orangefs: don't let orangefs_new_inode return NULL

Suggested by Dan Carpenter

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
Mike Marshall 2018-10-18 13:47:16 -04:00
parent 2978d87347
commit 56249998b2
1 changed files with 1 additions and 1 deletions

View 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 */