linux/drivers/char/hw_random
YueHaibing 8deed84744 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: 5fe8b1cc6a ("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>
2019-02-20 17:56:27 +01:00
..
amd-rng.c hwrng: amd - Revert managed API changes 2017-03-16 17:43:10 +08:00
atmel-rng.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
bcm2835-rng.c hwrng: bcm2835 - Switch to SPDX identifier 2018-11-16 14:11:04 +08:00
cavium-rng-vf.c hwrng: cavium - make two functions static 2018-03-09 22:45:34 +08:00
cavium-rng.c hwrng: cavium - make two functions static 2018-03-09 22:45:34 +08:00
core.c hwrng: core - document the quality field 2018-10-05 10:16:56 +08:00
exynos-trng.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
geode-rng.c hwrng: geode - Revert managed API changes 2017-03-16 17:43:11 +08:00
hisi-rng.c hwrng: hisi - Add support for Hisilicon SoC RNG 2016-04-15 22:36:36 +08:00
imx-rngc.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
intel-rng.c hwrng: printk replacement 2014-10-02 14:35:00 +08:00
iproc-rng200.c hwrng: iproc-rng200 - Add support for BCM7278 2017-11-10 19:20:12 +08:00
ixp4xx-rng.c
Kconfig hwrng: add OP-TEE based rng driver 2019-02-01 15:12:46 +01:00
ks-sa-rng.c hwrng: ks-sa - add hw_random driver 2018-03-23 23:40:08 +08:00
Makefile hwrng: add OP-TEE based rng driver 2019-02-01 15:12:46 +01:00
meson-rng.c hwrng: meson - add clock handling to driver 2017-03-16 17:58:49 +08:00
mtk-rng.c hwrng: mediatek - Setup default RNG quality 2018-01-18 22:52:25 +11:00
mxc-rnga.c hwrng: mxc-rnga - add driver support on boards with device tree 2018-03-16 23:35:44 +08:00
n2-asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2-drv.c hwrng: n2 - fix spelling mistake: "restesting" -> "retesting" 2018-05-19 00:13:53 +08:00
n2rng.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
nomadik-rng.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-04-03 09:28:16 -07:00
octeon-rng.c hwrng: octeon - Use devm_hwrng_register 2015-09-21 22:00:38 +08:00
omap3-rom-rng.c hwrng: omap3-rom - Handle return value of clk_prepare_enable 2017-05-23 12:52:03 +08:00
omap-rng.c hwrng: omap - Fix clock resource by adding a register clock 2018-03-09 22:45:45 +08:00
optee-rng.c hwrng: Fix unsigned comparison with less than zero 2019-02-20 17:56:27 +01:00
pasemi-rng.c hwrng: pasemi - Use linux/io.h instead of asm/io.h 2016-09-13 20:27:21 +08:00
pic32-rng.c hwrng: Make explicit that max >= 32 always 2016-11-21 22:50:45 +08:00
powernv-rng.c headers: separate linux/mod_devicetable.h from linux/platform_device.h 2018-07-07 17:52:26 +02:00
pseries-rng.c hwrng: pseries - constify vio_device_id 2017-09-22 17:43:05 +08:00
s390-trng.c s390/trng: Introduce s390 TRNG device driver. 2017-04-26 13:41:36 +02:00
st-rng.c hwrng: st - Fix missing clk_disable_unprepare() on error in st_rng_probe() 2016-09-13 20:27:24 +08:00
stm32-rng.c hwrng: stm32 - fix pm_suspend issue 2018-05-05 14:52:49 +08:00
timeriomem-rng.c hwrng: timeriomem - Remove 'max < 4' condition check 2017-09-22 17:43:14 +08:00
tx4939-rng.c hwrng: tx4939 - Use devm_hwrng_register instead of hwrng_register 2016-08-31 23:00:49 +08:00
via-rng.c hwrng: via - support new Centaur CPU 2018-04-21 00:59:03 +08:00
virtio-rng.c hwrng: virtio - Virtio RNG devices need to be re-registered after suspend/resume 2017-11-06 14:45:06 +08:00
xgene-rng.c hwrng: xgene - Convert timers to use timer_setup() 2017-11-03 22:11:16 +08:00