diff options
Diffstat (limited to 'tools/perf')
-rw-r--r-- | tools/perf/util/python.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c index 69436b3200a4..2dd1698e0932 100644 --- a/tools/perf/util/python.c +++ b/tools/perf/util/python.c | |||
@@ -694,14 +694,12 @@ static PyObject *pyrf_evlist__read_on_cpu(struct pyrf_evlist *pevlist, | |||
694 | err = perf_event__parse_sample(event, first->attr.sample_type, | 694 | err = perf_event__parse_sample(event, first->attr.sample_type, |
695 | perf_sample_size(first->attr.sample_type), | 695 | perf_sample_size(first->attr.sample_type), |
696 | sample_id_all, &pevent->sample); | 696 | sample_id_all, &pevent->sample); |
697 | if (err) { | 697 | if (err) |
698 | pr_err("Can't parse sample, err = %d\n", err); | 698 | return PyErr_Format(PyExc_OSError, |
699 | goto end; | 699 | "perf: can't parse sample, err=%d", err); |
700 | } | ||
701 | |||
702 | return pyevent; | 700 | return pyevent; |
703 | } | 701 | } |
704 | end: | 702 | |
705 | Py_INCREF(Py_None); | 703 | Py_INCREF(Py_None); |
706 | return Py_None; | 704 | return Py_None; |
707 | } | 705 | } |