]> git.dujemihanovic.xyz Git - u-boot.git/commit
fs: btrfs: initialize @ret to 0 to prevent uninitialized return value
authorQu Wenruo <wqu@suse.com>
Sat, 31 Oct 2020 01:07:51 +0000 (09:07 +0800)
committerTom Rini <trini@konsulko.com>
Thu, 19 Nov 2020 14:45:49 +0000 (09:45 -0500)
commit4891c4e595b48ee41b7d8062bb599d05a938ea0a
treeb2b9c37a873ded4d9facb8c2e8e39f1b523d0de3
parent9b5546c37ab020039f06855eae28fbd56adb096b
fs: btrfs: initialize @ret to 0 to prevent uninitialized return value

In show_dir() if we hit a ROOT_ITEM, we can exit with uninitialized
@ret.

Fix it by initializing it to 0.

Reported-by: Coverity CID 312955
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Marek BehĂșn <marek.behun@nic.cz>
fs/btrfs/btrfs.c