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

Commit 368857c1 authored by Daniel Axtens's avatar Daniel Axtens Committed by Michael Ellerman
Browse files

cxl: Don't ignore add_process_element() result when attaching context



Currently when attaching a context in dedicated mode, we ignore the
result of add_process_element(), which could potentially fail.

If add_process_element() returns an error, pass it back to the caller.

Signed-off-by: default avatarDaniel Axtens <dja@axtens.net>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 62521ea6
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -492,9 +492,7 @@ static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr)
	if ((result = cxl_afu_check_and_enable(ctx->afu)))
		return result;

	add_process_element(ctx);

	return 0;
	return add_process_element(ctx);
}

static int deactivate_afu_directed(struct cxl_afu *afu)