mirror of
https://github.com/torvalds/linux.git
synced 2026-12-05 21:04:14 +00:00
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 <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Colin Ian King <[email protected]>
Addresses-Coverity: ("Uninitialized scalar variable")
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>