btrfs-progs: inspect: Bypass unnecessary clean function in open_error
authorZhao Lei <zhaolei@cn.fujitsu.com>
Mon, 12 Oct 2015 13:22:57 +0000 (21:22 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 2 Nov 2015 08:35:01 +0000 (09:35 +0100)
No need to cleanup fd in open_fail case, because it is not opened.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.com>
cmds-inspect.c

index fc3db99..879fd43 100644 (file)
@@ -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;
 }