ppc/cell: missing error code in spufs_mkgang()
PATCH 1/1 ppc/cell: missing error code in spufs_mkgang()
We should return -ENOMEM if alloc_spu_gang() fails.
Signed-off-by Dan Carpenter <[email protected]>
arch/powerpc/platforms/cell/spufs/inode.c +3 -1
@@ -496,8 +496,10 @@ spufs_mkgang(struct inode *dir, struct dentry *dentry, umode_t mode) gang =alloc_spu_gang ();SPUFS_I (inode)->i_ctx =NULL ;SPUFS_I (inode)->i_gang = gang; -if (!gang) +if (!gang) { + ret = -ENOMEM ; goto out_iput; + } inode->i_op = &simple_dir_inode_operations; inode->i_fop = &simple_dir_operations;
Quoted 4 lines · CEST Dan Carpenter
We should return
-ENOMEMifalloc_spu_gang()fails.Signed-off-by Dan Carpenter <[email protected]>
Acked-by Arnd Bergmann <[email protected]>
Michael Ellerman
AppliedQuoted 4 lines · Dan Carpenter
We should return
-ENOMEMifalloc_spu_gang()fails.Signed-off-by Dan Carpenter <[email protected]>Acked-by Arnd Bergmann <[email protected]>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/54a94fcf2f00c9deb9491d5ab2
cheers