xtensa: fix incorrect fd close in error case of simdisk_setup()
dev->fd is opened in attach operation, so should not
close dev->fd in error case of simdisk_setup().
Signed-off-by: Chengguang Xu <cgxu519@gmail.com>
Message-Id: <1557066367-4783-1-git-send-email-cgxu519@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
diff --git a/arch/xtensa/platforms/iss/simdisk.c b/arch/xtensa/platforms/iss/simdisk.c
index 026211e..5fac8b7 100644
--- a/arch/xtensa/platforms/iss/simdisk.c
+++ b/arch/xtensa/platforms/iss/simdisk.c
@@ -297,7 +297,6 @@
blk_cleanup_queue(dev->queue);
dev->queue = NULL;
out_alloc_queue:
- simc_close(dev->fd);
return -EIO;
}