Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Chengguang Xu and committed by
Max Filippov
fb1b79d8 e93c9c99

-1
-1
arch/xtensa/platforms/iss/simdisk.c
··· 297 297 blk_cleanup_queue(dev->queue); 298 298 dev->queue = NULL; 299 299 out_alloc_queue: 300 - simc_close(dev->fd); 301 300 return -EIO; 302 301 } 303 302