diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-08-04 08:37:03 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2016-08-09 07:50:18 +0300 |
commit | 54a94fcf2f00c9deb9491d5ab2b5a4022332f47e (patch) | |
tree | a68386b012d1e9b3f8cdd7e8342648710b6be8e4 /arch/powerpc/platforms/cell/spufs | |
parent | 880a3d6afd068682d6386a0528be1217541d3d8e (diff) | |
download | linux-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/powerpc/platforms/cell/spufs')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/inode.c | 4 |
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 5be15cff758d..2975754c65ea 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; |