Re: [PATCH] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-20 Thread Jarkko Sakkinen
On Mon, Jan 18, 2021 at 09:33:58PM +0800, Tianjia Zhang wrote: > In this scenario, there is no case where va_page is NULL, and > the error has been checked. The if condition statement here is > redundant, so remove the condition detection. > > Reported-by: Jia Zhang > Signed-off-by: Tianjia Zhang

Re: [PATCH] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-19 Thread Sean Christopherson
On Mon, Jan 18, 2021, Tianjia Zhang wrote: > In this scenario, there is no case where va_page is NULL, and > the error has been checked. The if condition statement here is > redundant, so remove the condition detection. > > Reported-by: Jia Zhang > Signed-off-by: Tianjia Zhang > --- > arch/x86/

[PATCH] x86/sgx: Remove redundant if conditions in sgx_encl_create

2021-01-18 Thread Tianjia Zhang
In this scenario, there is no case where va_page is NULL, and the error has been checked. The if condition statement here is redundant, so remove the condition detection. Reported-by: Jia Zhang Signed-off-by: Tianjia Zhang --- arch/x86/kernel/cpu/sgx/ioctl.c | 5 ++--- 1 file changed, 2 inserti