Commit 1b07ea2a authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Chandan Babu R

xfs: shmem_file_setup can't return NULL

shmem_file_setup always returns a struct file pointer or an ERR_PTR,
so remove the code to check for a NULL return.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChandan Babu R <chandanbabu@kernel.org>
parent b44c0eb8
...@@ -62,15 +62,13 @@ xfile_create( ...@@ -62,15 +62,13 @@ xfile_create(
{ {
struct inode *inode; struct inode *inode;
struct xfile *xf; struct xfile *xf;
int error = -ENOMEM; int error;
xf = kmalloc(sizeof(struct xfile), XCHK_GFP_FLAGS); xf = kmalloc(sizeof(struct xfile), XCHK_GFP_FLAGS);
if (!xf) if (!xf)
return -ENOMEM; return -ENOMEM;
xf->file = shmem_file_setup(description, isize, VM_NORESERVE); xf->file = shmem_file_setup(description, isize, VM_NORESERVE);
if (!xf->file)
goto out_xfile;
if (IS_ERR(xf->file)) { if (IS_ERR(xf->file)) {
error = PTR_ERR(xf->file); error = PTR_ERR(xf->file);
goto out_xfile; goto out_xfile;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment