Skip to content
Commit b4e964f8 authored by Colin Ian King's avatar Colin Ian King Committed by Greg Kroah-Hartman
Browse files

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: 639781dc ("habanalabs/gaudi: add debugfs to DMA from the device")
Reviewed-by: default avatarOded Gabbay <ogabbay@kernel.org>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarColin 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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 39d2a789
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