summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index c5cd55ac848..336f238102f 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -132,10 +132,10 @@ int spu_acquire_runnable(struct spu_context *ctx)
if (ctx->state == SPU_STATE_SAVED) {
ret = spu_activate(ctx, 0);
+ if (ret)
+ goto out;
ctx->state = SPU_STATE_RUNNABLE;
}
- if (ret)
- goto out;
downgrade_write(&ctx->state_sema);
/* On success, we return holding the lock */