Message ID | 20200529175407.2109-2-sean.j.christopherson@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | x86/sgx: Misc fixes for v31 | expand |
diff --git a/arch/x86/kernel/cpu/sgx/ioctl.c b/arch/x86/kernel/cpu/sgx/ioctl.c index ec5a0f017014b..2019ee1dc0b3e 100644 --- a/arch/x86/kernel/cpu/sgx/ioctl.c +++ b/arch/x86/kernel/cpu/sgx/ioctl.c @@ -790,7 +790,7 @@ long sgx_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) return -EBUSY; if (encl_flags & SGX_ENCL_DEAD) { - return -EFAULT; + ret = -EFAULT; goto out; }
Set 'ret' instead of returning if the enclave is dead in sgx_ioctl(), otherwise the goto that was added doesn't take effect. Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com> --- arch/x86/kernel/cpu/sgx/ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)