aboutsummaryrefslogtreecommitdiffstats
path: root/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c
diff options
context:
space:
mode:
Diffstat (limited to 'xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c')
-rw-r--r--xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c
index 8626a36569..6ef1838a2b 100644
--- a/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c
+++ b/xenolinux-2.4.21-pre4-sparse/arch/xeno/drivers/block/xl_segment.c
@@ -21,7 +21,7 @@ static int xlseg_blksize_size[XLVIRT_MAX];
static int xlseg_hardsect_size[XLVIRT_MAX];
static int xlseg_max_sectors[XLVIRT_MAX];
-struct gendisk *xlsegment_gendisk;
+struct gendisk *xlsegment_gendisk = NULL;
static xen_disk_info_t xlseg_disk_info;
@@ -148,6 +148,8 @@ int __init xlseg_init(void)
static void __exit xlseg_cleanup(void)
{
+ if ( xlsegment_gendisk == NULL ) return;
+
blk_cleanup_queue(BLK_DEFAULT_QUEUE(XLVIRT_MAJOR));
xlsegment_gendisk = NULL;