diff options
author | Alex Shi <alex.shi@linaro.org> | 2017-02-04 12:11:17 +0800 |
---|---|---|
committer | Alex Shi <alex.shi@linaro.org> | 2017-02-04 12:11:17 +0800 |
commit | 5bee6fb934ecb5c3eac5aa05b3c39505a4c130ad (patch) | |
tree | 78d053de0c0e7f8d88edf9b967a470868ad55f8e /tools | |
parent | b4bbeeb816c06fd59dea2ea82c7b5650eb185e65 (diff) | |
parent | efa59a01f75e4b1e1b870cbdbb4ffd5a0ab27caf (diff) |
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/trace-event-scripting.c | 6 | ||||
-rw-r--r-- | tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c index 9df61059a85d..a2fd6e79d5a5 100644 --- a/tools/perf/util/trace-event-scripting.c +++ b/tools/perf/util/trace-event-scripting.c @@ -95,7 +95,8 @@ static void register_python_scripting(struct scripting_ops *scripting_ops) if (err) die("error registering py script extension"); - scripting_context = malloc(sizeof(struct scripting_context)); + if (scripting_context == NULL) + scripting_context = malloc(sizeof(*scripting_context)); } #ifdef NO_LIBPYTHON @@ -159,7 +160,8 @@ static void register_perl_scripting(struct scripting_ops *scripting_ops) if (err) die("error registering pl script extension"); - scripting_context = malloc(sizeof(struct scripting_context)); + if (scripting_context == NULL) + scripting_context = malloc(sizeof(*scripting_context)); } #ifdef NO_LIBPERL diff --git a/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c b/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c index c22860ab9733..30e1ac62e8cb 100644 --- a/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c +++ b/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c @@ -66,7 +66,7 @@ int pmc56_overflow(void) FAIL_IF(ebb_event_enable(&event)); - mtspr(SPRN_PMC1, pmc_sample_period(sample_period)); + mtspr(SPRN_PMC2, pmc_sample_period(sample_period)); mtspr(SPRN_PMC5, 0); mtspr(SPRN_PMC6, 0); |