diff options
Diffstat (limited to 'tapset-perfmon.cxx')
-rw-r--r-- | tapset-perfmon.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tapset-perfmon.cxx b/tapset-perfmon.cxx index 05a2bcd8..5c2d73e8 100644 --- a/tapset-perfmon.cxx +++ b/tapset-perfmon.cxx @@ -152,8 +152,9 @@ perf_derived_probe_group::emit_module_init (systemtap_session& s) s.op->newline() << "for (i=0; i<" << probes.size() << "; i++) {"; s.op->newline(1) << "struct stap_perf_probe* stp = & stap_perf_probes [i];"; s.op->newline() << "stp->perf = _stp_perf_init(&stp->attr, stp->cb, stp->pp, stp->ph);"; - s.op->newline() << "if (stp->perf == NULL) {"; - s.op->newline(1) << "rc = -EINVAL;"; + s.op->newline() << "if (IS_ERR(stp->perf)) {"; + s.op->newline(1) << "rc = PTR_ERR(stp->perf);"; + s.op->newline() << "stp->perf = NULL;"; s.op->newline() << "probe_point = stp->pp;"; s.op->newline() << "for (j=0; j<i; j++) {"; s.op->newline(1) << "stp = & stap_perf_probes [j];"; |