Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[firefly-linux-kernel-4.4.55.git] / tools / perf / util / symbol-minimal.c
index d7efb03b3f9aab2d0382afb1d031790109462233..fd8477cacf888f2bdac70fbc71a4f0461fbfc9b5 100644 (file)
@@ -246,13 +246,12 @@ out:
        return ret;
 }
 
-int symsrc__init(struct symsrc *ss, struct dso *dso __maybe_unused,
-                const char *name,
+int symsrc__init(struct symsrc *ss, struct dso *dso, const char *name,
                 enum dso_binary_type type)
 {
        int fd = open(name, O_RDONLY);
        if (fd < 0)
-               return -1;
+               goto out_errno;
 
        ss->name = strdup(name);
        if (!ss->name)
@@ -264,6 +263,8 @@ int symsrc__init(struct symsrc *ss, struct dso *dso __maybe_unused,
        return 0;
 out_close:
        close(fd);
+out_errno:
+       dso->load_errno = errno;
        return -1;
 }