linux/drivers/misc/habanalabs
Colin Ian King b4e964f84c habanalabs/gaudi: Fix uninitialized return code rc when read size is zero
In the case where size is zero the while loop never assigns rc and the
return value is uninitialized. Fix this by initializing rc to zero.

Fixes: 639781dcab ("habanalabs/gaudi: add debugfs to DMA from the device")
Reviewed-by: Oded Gabbay <ogabbay@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Uninitialized scalar variable")
Link: https://lore.kernel.org/r/20210412161012.1628202-1-colin.king@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-04-16 07:26:50 +02:00
..
common habanalabs: print f/w boot unknown error 2021-04-09 14:10:32 +03:00
gaudi habanalabs/gaudi: Fix uninitialized return code rc when read size is zero 2021-04-16 07:26:50 +02:00
goya habanalabs/gaudi: skip iATU if F/W security is enabled 2021-04-09 14:09:25 +03:00
include habanalabs: update to latest F/W communication header 2021-04-09 14:09:25 +03:00
Kconfig misc/habana: Stop using frame_vector helpers 2021-01-12 14:14:53 +01:00
Makefile habanalabs: create common folder 2020-07-24 20:31:37 +03:00