[intel-sgx-kernel-dev,2/4] intel_sgx: Update ret val if vm_insert_pfn fails
diff mbox

Message ID 1484081758-20302-3-git-send-email-sean.j.christopherson@intel.com
State New
Headers show

Commit Message

Sean Christopherson Jan. 10, 2017, 8:55 p.m. UTC
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkine@linux.intel.com>
---
 drivers/platform/x86/intel_sgx_vma.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox

diff --git a/drivers/platform/x86/intel_sgx_vma.c b/drivers/platform/x86/intel_sgx_vma.c
index e8a67b6..e670405 100644
--- a/drivers/platform/x86/intel_sgx_vma.c
+++ b/drivers/platform/x86/intel_sgx_vma.c
@@ -255,6 +255,7 @@  static struct sgx_encl_page *sgx_vma_do_fault(struct vm_area_struct *vma,
 
 	if (rc) {
 		free_flags = 0;
+		entry = ERR_PTR(rc);
 		goto out;
 	}