diff options
author | Sean Paul <seanpaul@chromium.org> | 2017-09-21 23:18:46 +0200 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-09-21 23:18:46 +0200 |
commit | 1ebfc603d046f1dda6507d11803f9b4046cee712 (patch) | |
tree | 3be6790f2ce819929b1ccff7993c636e0944705a /drivers/perf/arm_pmu.c | |
parent | qxl: fix primary surface handling (diff) | |
parent | Merge tag 'kbuild-fixes-v4.14' of git://git.kernel.org/pub/scm/linux/kernel/g... (diff) | |
download | linux-1ebfc603d046f1dda6507d11803f9b4046cee712.tar.xz linux-1ebfc603d046f1dda6507d11803f9b4046cee712.zip |
Merge remote-tracking branch 'origin/master' into drm-misc-fixes
Pick up 4.14-rc1
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drivers/perf/arm_pmu.c')
-rw-r--r-- | drivers/perf/arm_pmu.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 1c5e0f333779..d14fc2e67f93 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -47,6 +47,9 @@ armpmu_map_cache_event(const unsigned (*cache_map) if (cache_result >= PERF_COUNT_HW_CACHE_RESULT_MAX) return -EINVAL; + if (!cache_map) + return -ENOENT; + ret = (int)(*cache_map)[cache_type][cache_op][cache_result]; if (ret == CACHE_OP_UNSUPPORTED) @@ -63,6 +66,9 @@ armpmu_map_hw_event(const unsigned (*event_map)[PERF_COUNT_HW_MAX], u64 config) if (config >= PERF_COUNT_HW_MAX) return -EINVAL; + if (!event_map) + return -ENOENT; + mapping = (*event_map)[config]; return mapping == HW_OP_UNSUPPORTED ? -ENOENT : mapping; } |