aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/cxl/native.c
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2015-07-29 00:07:22 -0400
committerMichael Ellerman <mpe@ellerman.id.au>2015-08-06 01:10:19 -0400
commit368857c16c595eb7537cc0846708ddaa57a3a25b (patch)
tree83e72ec76ba616f04e1ec5544415e598bb8fd13d /drivers/misc/cxl/native.c
parent62521ea6db1045a746d4625f40ef6be8b74f126d (diff)
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>
Diffstat (limited to 'drivers/misc/cxl/native.c')
-rw-r--r--drivers/misc/cxl/native.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/misc/cxl/native.c b/drivers/misc/cxl/native.c
index fc9310dd2367..f74ff80266c8 100644
--- a/drivers/misc/cxl/native.c
+++ b/drivers/misc/cxl/native.c
@@ -492,9 +492,7 @@ static int attach_afu_directed(struct cxl_context *ctx, u64 wed, u64 amr)
492 if ((result = cxl_afu_check_and_enable(ctx->afu))) 492 if ((result = cxl_afu_check_and_enable(ctx->afu)))
493 return result; 493 return result;
494 494
495 add_process_element(ctx); 495 return add_process_element(ctx);
496
497 return 0;
498} 496}
499 497
500static int deactivate_afu_directed(struct cxl_afu *afu) 498static int deactivate_afu_directed(struct cxl_afu *afu)