Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01062465 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Paul Mackerras
Browse files

[PATCH] spufs fix spu_acquire_runnable error path



When spu_activate fails in spu_acquire_runnable, the
state must still be SPU_STATE_SAVED, we were
incorrectly setting it to SPU_STATE_RUNNABLE.

Signed-off-by: default avatarArnd Bergmann <arndb@de.ibm.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 5ef8224a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -132,10 +132,10 @@ int spu_acquire_runnable(struct spu_context *ctx)

	if (ctx->state == SPU_STATE_SAVED) {
		ret = spu_activate(ctx, 0);
		ctx->state = SPU_STATE_RUNNABLE;
	}
		if (ret)
			goto out;
		ctx->state = SPU_STATE_RUNNABLE;
	}

	downgrade_write(&ctx->state_sema);
	/* On success, we return holding the lock */