]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
cxl: Don't ignore add_process_element() result when attaching context
authorDaniel Axtens <dja@axtens.net>
Wed, 29 Jul 2015 04:07:22 +0000 (14:07 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 6 Aug 2015 05:10:19 +0000 (15:10 +1000)
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>
drivers/misc/cxl/native.c

index fc9310dd2367d7c7a126baa9194f3742794a5a5a..f74ff80266c88609de63af0f0138b48fcdcea0d4 100644 (file)
@@ -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)