Coverity reports execution cannot reach this statements. So put WARN_ON
in if-else conditions.
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
eb = path->nodes[level];
while (!eb) {
- WARN_ON(!level);
if (!level) {
ret = 1;
+ WARN_ON(1);
goto out;
}
level--;
logical, logical - found_key->objectid, found_key->objectid,
found_key->offset, flags, item_size);
- WARN_ON(!flags_ret);
if (flags_ret) {
if (flags & BTRFS_EXTENT_FLAG_TREE_BLOCK)
*flags_ret = BTRFS_EXTENT_FLAG_TREE_BLOCK;
else
BUG_ON(1);
return 0;
+ } else {
+ WARN_ON(1);
+ return -EIO;
}
-
- return -EIO;
}
/*