perf header: Get rid of write_it label
authorJiri Olsa <jolsa@kernel.org>
Wed, 13 Feb 2019 12:32:43 +0000 (13:32 +0100)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Thu, 14 Feb 2019 18:18:09 +0000 (15:18 -0300)
Simplifying the code a bit.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190213123246.4015-8-jolsa@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/header.c

index dec6d218c31c326ceac4d4464c8c9ce012a1be61..f1508adefc167cc8a6112e7ee9b66a888366ea88 100644 (file)
@@ -1042,11 +1042,9 @@ static int write_cpuid(struct feat_fd *ff,
        int ret;
 
        ret = get_cpuid(buffer, sizeof(buffer));
-       if (!ret)
-               goto write_it;
+       if (ret)
+               return -1;
 
-       return -1;
-write_it:
        return do_write_string(ff, buffer);
 }