[patch] ppc/cell: missing error code in spufs_mkgang()

Subsystems: cell broadband engine architecture, linux for powerpc (32-bit and 64-bit), spu file system, the rest

STALE3647d

3 messages, 3 authors, 2016-08-09 · open the first message on its own page

[patch] ppc/cell: missing error code in spufs_mkgang()

From: Dan Carpenter <hidden>
Date: 2016-08-04 05:37:40

We should return -ENOMEM if alloc_spu_gang() fails.

Signed-off-by: Dan Carpenter <redacted>
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;

Re: [patch] ppc/cell: missing error code in spufs_mkgang()

From: Arnd Bergmann <arnd@arndb.de>
Date: 2016-08-04 07:03:05

On Thursday, August 4, 2016 8:37:03 AM CEST Dan Carpenter wrote:
We should return -ENOMEM if alloc_spu_gang() fails.

Signed-off-by: Dan Carpenter <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de>

Re: ppc/cell: missing error code in spufs_mkgang()

From: Michael Ellerman <hidden>
Date: 2016-08-09 11:26:44

On Thu, 2016-04-08 at 05:37:03 UTC, Dan Carpenter wrote:
We should return -ENOMEM if alloc_spu_gang() fails.

Signed-off-by: Dan Carpenter <redacted>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/54a94fcf2f00c9deb9491d5ab2

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help