Thread (3 messages) flat view 3 messages, 3 authors, 2016-08-09
STALE3666d

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

From: Dan Carpenter <hidden>
Date: 2016-08-04 05:37:40
Also in: kernel-janitors
Subsystem: cell broadband engine architecture, linux for powerpc (32-bit and 64-bit), spu file system, the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

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;
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help