Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>

authored by

Daniel Axtens and committed by
Michael Ellerman
368857c1 62521ea6

+1 -3
+1 -3
drivers/misc/cxl/native.c
··· 492 492 if ((result = cxl_afu_check_and_enable(ctx->afu))) 493 493 return result; 494 494 495 - add_process_element(ctx); 496 - 497 - return 0; 495 + return add_process_element(ctx); 498 496 } 499 497 500 498 static int deactivate_afu_directed(struct cxl_afu *afu)