]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: fix return value check in erofs_read_superblock()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 18 Sep 2019 08:30:33 +0000 (08:30 +0000)
committerGao Xiang <gaoxiang25@huawei.com>
Mon, 30 Sep 2019 20:53:50 +0000 (04:53 +0800)
commitff557f6475ff3612f962dbe73e1c5048eadbbb37
treeef7fb5c474862c61dc5f0116e3f85f20b4bd4a28
parentf5c4776cd5b591eea4e9be9f421e34f61b98ebb2
erofs: fix return value check in erofs_read_superblock()

In case of error, the function read_mapping_page() returns
ERR_PTR() not NULL. The NULL test in the return value check
should be replaced with IS_ERR().

Fixes: bf731eb99bb1 ("erofs: use read_mapping_page instead of sb_bread")
Reviewed-by: Gao Xiang <gaoxiang25@huawei.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Link: https://lore.kernel.org/r/20190918083033.47780-1-weiyongjun1@huawei.com
Signed-off-by: Gao Xiang <gaoxiang25@huawei.com>
fs/erofs/super.c