From: Daniel Axtens Date: Wed, 29 Jul 2015 04:07:22 +0000 (+1000) Subject: cxl: Don't ignore add_process_element() result when attaching context X-Git-Tag: firefly_0821_release~176^2~1149^2~69 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=368857c16c595eb7537cc0846708ddaa57a3a25b;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Michael Ellerman --- 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) 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)