summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_files.py
diff options
context:
space:
mode:
authorPurva Yeshi <purvayeshi550@gmail.com>2025-07-10 13:11:57 +0530
committerMikulas Patocka <mpatocka@redhat.com>2025-07-31 15:39:55 +0200
commit487767bff572d46f7c37ad846c4078f6d6c9cc55 (patch)
tree7fbad5e94d526f5f291418c28ecd7a390c0732da /scripts/lib/kdoc/kdoc_files.py
parentbdf253d580d7d30e7620844c63a5013fe7ba3f87 (diff)
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 'scripts/lib/kdoc/kdoc_files.py')
0 files changed, 0 insertions, 0 deletions