diff options
author | YueHaibing <yuehaibing@huawei.com> | 2019-02-19 07:33:02 +0100 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2019-02-20 17:56:27 +0100 |
commit | 8deed847445a8fb619689988a24c0f8df1369a58 (patch) | |
tree | 6f7c2859b0363e3a0a6827bac2657a9c8dda8227 /drivers/tee | |
parent | tee: fix possible error pointer ctx dereferencing (diff) | |
download | linux-8deed847445a8fb619689988a24c0f8df1369a58.tar.xz linux-8deed847445a8fb619689988a24c0f8df1369a58.zip |
hwrng: 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: 5fe8b1cc6a03 ("hwrng: add OP-TEE based rng driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Sumit Garg <sumit.garg@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/tee')
0 files changed, 0 insertions, 0 deletions