Skip to contentSkip to conversation

ppc/cell: missing error code in spufs_mkgang()

PATCH Applied Dan Carpenter 3 participants 3 messages Aug 4, 2016 – Aug 9, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ppc/cell: missing error code in spufs_mkgang()

We should return -ENOMEM if alloc_spu_gang() fails.

arch/powerpc/platforms/cell/spufs/inode.c +3 -1
index 5be15cf..2975754 100644
@@ -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;