From ee092f00e735505741fde8a0213d69c066780fdc Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 14 Nov 2013 09:14:18 +0000 Subject: [PATCH] scst_vdisk, procfs: Test virt_dev->dev before using it git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5111 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 7ab5a4dff..be0372a20 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -5906,7 +5906,7 @@ static int vdisk_read_proc(struct seq_file *seq, struct scst_dev_type *dev_type) list_for_each_entry(virt_dev, &vdev_list, vdev_list_entry) { int c; - if (virt_dev->dev->type != TYPE_DISK) + if (virt_dev->dev && virt_dev->dev->type != TYPE_DISK) continue; seq_printf(seq, "%-17s %-11d %-12d", virt_dev->name, (uint32_t)(virt_dev->file_size >> 20),