Skip to content
Commit 62ade1be authored by YueHaibing's avatar YueHaibing Committed by Arnd Bergmann
Browse files

tee: optee: Fix unsigned comparison with less than zero



The return from the call to tee_client_invoke_func can be a
negative error code however this is being assigned to an
unsigned variable 'ret' hence the check is always false.
Fix this by making 'ret' an int.

Detected by Coccinelle ("Unsigned expression compared with zero:
ret < 0")

Fixes: c3fa24af ("tee: optee: add TEE bus device enumeration support")
Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
Reviewed-by: default avatarSumit Garg <sumit.garg@linaro.org>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parent 8deed847
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment