diff options
author | 2025-07-10 13:11:57 +0530 | |
---|---|---|
committer | 2025-07-31 15:39:55 +0200 | |
commit | 487767bff572d46f7c37ad846c4078f6d6c9cc55 (patch) | |
tree | 7fbad5e94d526f5f291418c28ecd7a390c0732da /rust/pin-init/internal/src | |
parent | dm-verity: remove support for asynchronous hashes (diff) | |
download | wireguard-linux-487767bff572d46f7c37ad846c4078f6d6c9cc55.tar.xz wireguard-linux-487767bff572d46f7c37ad846c4078f6d6c9cc55.zip |
md: dm-zoned-target: Initialize return variable r to avoid uninitialized use
Fix Smatch-detected error:
drivers/md/dm-zoned-target.c:1073 dmz_iterate_devices()
error: uninitialized symbol 'r'.
Smatch detects a possible use of the uninitialized variable 'r' in
dmz_iterate_devices() because if dmz->nr_ddevs is zero, the loop is
skipped and 'r' is returned without being set, leading to undefined
behavior.
Initialize 'r' to 0 before the loop. This ensures that if there are no
devices to iterate over, the function still returns a defined value.
Signed-off-by: Purva Yeshi <purvayeshi550@gmail.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'rust/pin-init/internal/src')
0 files changed, 0 insertions, 0 deletions