diff mbox

[intel-sgx-kernel-dev,2/2] intel_sgx: check the return value of kthread_run

Message ID 1493660629-16888-3-git-send-email-sean.j.christopherson@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sean Christopherson May 1, 2017, 5:43 p.m. UTC
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
---
 drivers/platform/x86/intel_sgx/sgx_page_cache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/platform/x86/intel_sgx/sgx_page_cache.c b/drivers/platform/x86/intel_sgx/sgx_page_cache.c
index d4cf0cc..6b40d46 100644
--- a/drivers/platform/x86/intel_sgx/sgx_page_cache.c
+++ b/drivers/platform/x86/intel_sgx/sgx_page_cache.c
@@ -451,7 +451,7 @@  int sgx_page_cache_init(void)
 {
 	sgx_nr_high_pages = 2 * sgx_nr_low_pages;
 	ksgxswapd_tsk = kthread_run(ksgxswapd, NULL, "ksgxswapd");
-	return 0;
+	return PTR_ERR_OR_ZERO(ksgxswapd_tsk);
 }
 
 void sgx_page_cache_teardown(void)