From: Al Viro Date: Thu, 19 Jul 2012 12:07:30 +0000 (+0400) Subject: spufs_create_context(): simplify failure exits X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66ec7b2cd0d84561ef3c420b5995d0c1dd2cf1c5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git spufs_create_context(): simplify failure exits Signed-off-by: Al Viro --- diff --git a/arch/powerpc/platforms/cell/spufs/inode.c b/arch/powerpc/platforms/cell/spufs/inode.c index 4bff08139600..848134e72058 100644 --- a/arch/powerpc/platforms/cell/spufs/inode.c +++ b/arch/powerpc/platforms/cell/spufs/inode.c @@ -492,20 +492,14 @@ spufs_create_context(struct inode *inode, struct dentry *dentry, } ret = spufs_context_open(&path); - if (ret < 0) { + if (ret < 0) WARN_ON(spufs_rmdir(inode, dentry)); - if (affinity) - mutex_unlock(&gang->aff_mutex); - mutex_unlock(&inode->i_mutex); - goto out; - } out_aff_unlock: if (affinity) mutex_unlock(&gang->aff_mutex); out_unlock: mutex_unlock(&inode->i_mutex); -out: dput(dentry); return ret; }