diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index f01d4a8a783ac..e9776ca0996b0 100644 --- a/drivers/block/null_blk.c +++ b/drivers/block/null_blk.c @@ -1919,6 +1919,7 @@ out_cleanup_queues: cleanup_queues(nullb); out_free_nullb: kfree(nullb); + dev->nullb = NULL; out: return rv; }