From d4e66866b11a7f6fab2a8848059f6c77a171d2d7 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Mon, 27 Aug 2012 21:44:30 +0000 Subject: [PATCH] scst_vdisk: Remove a superfluous test If the code after the "out_close:" label is reached it is guaranteed that fd != NULL. Hence remove the if (fd != NULL) test after that label. Signed-off-by: Bart Van Assche git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4484 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 6bbb11c56..3b40d8946 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -671,7 +671,7 @@ out: static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) { - struct file *fd = NULL; + struct file *fd; TRACE_ENTRY(); @@ -707,8 +707,7 @@ static void vdisk_check_tp_support(struct scst_vdisk_dev *virt_dev) } out_close: - if (fd != NULL) - filp_close(fd, NULL); + filp_close(fd, NULL); out_check: if (virt_dev->thin_provisioned_manually_set) {