linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [patch] ppc/cell: missing error code in spufs_mkgang()
@ 2016-08-04  5:37 Dan Carpenter
  2016-08-04  7:02 ` Arnd Bergmann
  2016-08-09 11:26 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-08-04  5:37 UTC (permalink / raw)
  To: Jeremy Kerr
  Cc: Arnd Bergmann, Benjamin Herrenschmidt, Paul Mackerras,
	Michael Ellerman, linuxppc-dev, kernel-janitors

We should return -ENOMEM if alloc_spu_gang() fails.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

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;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-08-09 11:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-04  5:37 [patch] ppc/cell: missing error code in spufs_mkgang() Dan Carpenter
2016-08-04  7:02 ` Arnd Bergmann
2016-08-09 11:26 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).