[PATCH 04/11] btrfs-progs: inspect: Bypass unnecessary clean function in open_error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



No need to cleanup fd in open_fail case, because it is not opened.

Signed-off-by: Zhao Lei <zhaolei@xxxxxxxxxxxxxx>
---
 cmds-inspect.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/cmds-inspect.c b/cmds-inspect.c
index fc3db99..879fd43 100644
--- a/cmds-inspect.c
+++ b/cmds-inspect.c
@@ -626,9 +626,8 @@ static int cmd_inspect_min_dev_size(int argc, char **argv)
 	}
 
 	ret = print_min_dev_size(fd, devid);
-out:
 	close_file_or_dir(fd, dirstream);
-
+out:
 	return !!ret;
 }
 
-- 
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux