summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2016-08-04 05:37:03 (GMT)
committerMichael Ellerman <mpe@ellerman.id.au>2016-08-09 04:50:18 (GMT)
commit54a94fcf2f00c9deb9491d5ab2b5a4022332f47e (patch)
treea68386b012d1e9b3f8cdd7e8342648710b6be8e4 /arch
parent880a3d6afd068682d6386a0528be1217541d3d8e (diff)
downloadlinux-54a94fcf2f00c9deb9491d5ab2b5a4022332f47e.tar.xz
powerpc/cell: Add missing error code in spufs_mkgang()
We should return -ENOMEM if alloc_spu_gang() fails. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/platforms/cell/spufs/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c
index 5be15cf..2975754 100644
--- a/arch/powerpc/platforms/cell/spufs/inode.c
+++ b/arch/powerpc/platforms/cell/spufs/inode.c
@@ -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;