Merge branch 'acpi-ec'
[linux-drm-fsl-dcu.git] / tools / perf / util / header.c
index b20e40c74468d13f951c8e3415e7bd8db225ee53..1f407f7352a7fd2bab67ad13e63e5fcd053495ba 100644 (file)
@@ -2237,6 +2237,7 @@ static int check_magic_endian(u64 magic, uint64_t hdr_sz,
         * - unique number to identify actual perf.data files
         * - encode endianness of file
         */
+       ph->version = PERF_HEADER_VERSION_2;
 
        /* check magic number with one endianness */
        if (magic == __perf_magic2)
@@ -2247,7 +2248,6 @@ static int check_magic_endian(u64 magic, uint64_t hdr_sz,
                return -1;
 
        ph->needs_swap = true;
-       ph->version = PERF_HEADER_VERSION_2;
 
        return 0;
 }