bcache: Remove unnecessary NULL point check in node allocations
authorZheng Wang <zyytlz.wz@163.com>
Thu, 15 Jun 2023 12:12:21 +0000 (20:12 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Jun 2023 13:30:43 +0000 (07:30 -0600)
commit028ddcac477b691dd9205c92f991cc15259d033e
tree2a41a9170410e3de2bb6112a036d8eeff1d07822
parentccb8c3bd6d93e7986b702d1f66d5d56d08abc59f
bcache: Remove unnecessary NULL point check in node allocations

Due to the previous fix of __bch_btree_node_alloc, the return value will
never be a NULL pointer. So IS_ERR is enough to handle the failure
situation. Fix it by replacing IS_ERR_OR_NULL check by an IS_ERR check.

Fixes: cafe56359144 ("bcache: A block layer cache")
Cc: stable@vger.kernel.org
Signed-off-by: Zheng Wang <zyytlz.wz@163.com>
Signed-off-by: Coly Li <colyli@suse.de>
Link: https://lore.kernel.org/r/20230615121223.22502-5-colyli@suse.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/btree.c
drivers/md/bcache/super.c