]> www.infradead.org Git - users/jedix/linux-maple.git/commit
erofs: fix error return code in erofs_read_superblock()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 19 May 2021 14:16:57 +0000 (14:16 +0000)
committerGao Xiang <xiang@kernel.org>
Wed, 2 Jun 2021 16:09:09 +0000 (00:09 +0800)
commit9fc77ce34b031cb32fad720fae268c28163ac141
tree73d6da6fb090b5b79a99bbd9c8e1243a7cf61122
parent8124c8a6b35386f73523d27eacb71b5364a68c4c
erofs: fix error return code in erofs_read_superblock()

'ret' will be overwritten to 0 if erofs_sb_has_sb_chksum() return true,
thus 0 will return in some error handling cases. Fix to return negative
error code -EINVAL instead of 0.

Link: https://lore.kernel.org/r/20210519141657.3062715-1-weiyongjun1@huawei.com
Fixes: b858a4844cfb ("erofs: support superblock checksum")
Cc: stable <stable@vger.kernel.org> # 5.5+
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Gao Xiang <xiang@kernel.org>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Gao Xiang <xiang@kernel.org>
fs/erofs/super.c