When a mutex lock is not used any more, the function mutex_destroy should be called to mark the mutex lock uninitialized. Signed-off-by: Zhu Yanjun <yanjun.zhu@xxxxxxxxx> --- drivers/block/null_blk/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c index ed33cf7192d2..eed63f95e89d 100644 --- a/drivers/block/null_blk/main.c +++ b/drivers/block/null_blk/main.c @@ -2113,6 +2113,8 @@ static void __exit null_exit(void) if (tag_set.ops) blk_mq_free_tag_set(&tag_set); + + mutex_destroy(&lock); } module_init(null_init); -- 2.20.1