mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-01 09:13:37 +00:00
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: Christoph Hellwig <hch@lst.de> Reviewed-by: "Darrick J. Wong" <djwong@kernel.org> Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
This commit is contained in:
parent
b44c0eb8ae
commit
1b07ea2ab3
1 changed files with 1 additions and 3 deletions
|
|
@ -62,15 +62,13 @@ xfile_create(
|
|||
{
|
||||
struct inode *inode;
|
||||
struct xfile *xf;
|
||||
int error = -ENOMEM;
|
||||
int error;
|
||||
|
||||
xf = kmalloc(sizeof(struct xfile), XCHK_GFP_FLAGS);
|
||||
if (!xf)
|
||||
return -ENOMEM;
|
||||
|
||||
xf->file = shmem_file_setup(description, isize, VM_NORESERVE);
|
||||
if (!xf->file)
|
||||
goto out_xfile;
|
||||
if (IS_ERR(xf->file)) {
|
||||
error = PTR_ERR(xf->file);
|
||||
goto out_xfile;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue