summaryrefslogtreecommitdiff
path: root/drivers/block/skd_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/block/skd_main.c')
-rw-r--r--drivers/block/skd_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/skd_main.c b/drivers/block/skd_main.c
index 8ae0320f02b5..34188a600bfa 100644
--- a/drivers/block/skd_main.c
+++ b/drivers/block/skd_main.c
@@ -3041,7 +3041,8 @@ static void skd_free_disk(struct skd_device *skdev)
if (skdev->queue) {
blk_cleanup_queue(skdev->queue);
skdev->queue = NULL;
- disk->queue = NULL;
+ if (disk)
+ disk->queue = NULL;
}
if (skdev->tag_set.tags)