mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 19:21:26 +00:00
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
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user