diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index dd1103e2f..e06591426 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1287,7 +1287,8 @@ static int vdisk_attach(struct scst_device *dev) dev->dev_rd_only = virt_dev->rd_only; - if (vdisk_reexamine(virt_dev) < 0) + res = vdisk_reexamine(virt_dev); + if (res < 0) goto out; if (!virt_dev->cdrom_empty) {