aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-raid.c
diff options
context:
space:
mode:
authorPurva Yeshi <[email protected]>2025-07-10 07:41:57 +0000
committerMikulas Patocka <[email protected]>2025-07-31 13:39:55 +0000
commit487767bff572d46f7c37ad846c4078f6d6c9cc55 (patch)
tree7fbad5e94d526f5f291418c28ecd7a390c0732da /drivers/md/dm-raid.c
parentdm-verity: remove support for asynchronous hashes (diff)
downloadkernel-487767bff572d46f7c37ad846c4078f6d6c9cc55.tar.gz
kernel-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 <[email protected]> Signed-off-by: Mikulas Patocka <[email protected]>
Diffstat (limited to 'drivers/md/dm-raid.c')
0 files changed, 0 insertions, 0 deletions