From d615f4ade7ec8fbf75619b50723f2614e4535483 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 18 May 2014 11:26:42 +0000 Subject: [PATCH] scst_vdisk: Handle attach failures properly (follow-up for r5525) git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@5526 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {