drivers/md/md-bitmap: check the return value of md_bitmap_get_counter()
authorLi Zhong <floridsleeves@gmail.com>
Fri, 16 Sep 2022 23:33:05 +0000 (16:33 -0700)
committerSong Liu <song@kernel.org>
Mon, 14 Nov 2022 17:35:49 +0000 (09:35 -0800)
commit3bd548e5b819b8c0f2c9085de775c5c7bff9052f
treef6a8bf47de5de4b17adeffd72ade8ca7b8df991e
parent4f8126bb2308066b877859e4b5923ffb54143630
drivers/md/md-bitmap: check the return value of md_bitmap_get_counter()

Check the return value of md_bitmap_get_counter() in case it returns
NULL pointer, which will result in a null pointer dereference.

v2: update the check to include other dereference

Signed-off-by: Li Zhong <floridsleeves@gmail.com>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/md-bitmap.c