diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 4f4db991c4a6..b2cd3d6f2a31 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -303,7 +303,7 @@ err_init: err_queue: blk_cleanup_queue(tqueue); err_dev: - kfree(tgt_dev); + nvm_remove_tgt_dev(tgt_dev); err_t: kfree(t); err_reserve: