]> git.ipfire.org Git - thirdparty/u-boot.git/commit
btrfs: fix some error checking for btrfs_decompress()
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 3 Aug 2023 10:29:34 +0000 (13:29 +0300)
committerTom Rini <trini@konsulko.com>
Tue, 8 Aug 2023 21:41:52 +0000 (17:41 -0400)
commit08404fa2087946bb370430d466fe5011f18ef072
tree6c755cfa5c0428970564da2b5c11c0df18785d4a
parent939390b203dde8a0176dbfa272dcb7bc54949baf
btrfs: fix some error checking for btrfs_decompress()

The btrfs_decompress() function mostly (u32)-1 on error but it can
also return -EPERM or other kernel error codes from zstd_decompress().
The "ret" variable is an int, so we could just check for negatives.

Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Qu Wenruo <wqu@suse.com>
fs/btrfs/inode.c