perf symbols: Remove unused variable 'err'
authorLeo Yan <leo.yan@linaro.org>
Thu, 30 May 2019 09:38:01 +0000 (17:38 +0800)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Wed, 5 Jun 2019 12:47:54 +0000 (09:47 -0300)
Variable 'err' is defined but never used in function symsrc__init(),
remove it and directly return -1 at the end of the function.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190530093801.20510-1-leo.yan@linaro.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/symbol-elf.c

index 4ad106a5f2c06738d3ca27d6aca82641d7e29142..fdc5bd7dbb90694e3977bc2a27f0e78850b7088b 100644 (file)
@@ -699,7 +699,6 @@ bool __weak elf__needs_adjust_symbols(GElf_Ehdr ehdr)
 int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
                 enum dso_binary_type type)
 {
-       int err = -1;
        GElf_Ehdr ehdr;
        Elf *elf;
        int fd;
@@ -793,7 +792,7 @@ out_elf_end:
        elf_end(elf);
 out_close:
        close(fd);
-       return err;
+       return -1;
 }
 
 /**