diff options
| -rw-r--r-- | tools/perf/util/dso.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 45be944d450a..c2f7d3b90966 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c | |||
| @@ -532,12 +532,8 @@ dso_cache__read(struct dso *dso, u64 offset, u8 *data, ssize_t size) | |||
| 532 | break; | 532 | break; |
| 533 | 533 | ||
| 534 | cache_offset = offset & DSO__DATA_CACHE_MASK; | 534 | cache_offset = offset & DSO__DATA_CACHE_MASK; |
| 535 | ret = -EINVAL; | ||
| 536 | 535 | ||
| 537 | if (-1 == lseek(dso->data.fd, cache_offset, SEEK_SET)) | 536 | ret = pread(dso->data.fd, cache->data, DSO__DATA_CACHE_SIZE, cache_offset); |
| 538 | break; | ||
| 539 | |||
| 540 | ret = read(dso->data.fd, cache->data, DSO__DATA_CACHE_SIZE); | ||
| 541 | if (ret <= 0) | 537 | if (ret <= 0) |
| 542 | break; | 538 | break; |
| 543 | 539 | ||
