Messages in this thread | | | Date | Thu, 14 Apr 2022 14:00:44 +0100 | Subject | Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver | From | John Garry <> |
| |
On 12/04/2022 08:41, Yicong Yang wrote: >>> + hisi_ptt_pmus = zalloc(sizeof(struct perf_pmu *) * (*nr_ptts)); >>> + if (!hisi_ptt_pmus) { >>> + pr_err("hisi_ptt alloc failed\n"); >>> + *err = -ENOMEM; >> using PTR_ERR seems better, if possible >> > ok will change to that. *err = -ENOMEM is used here to keep consistence with > what spe does. >
Ah, I see that we are contrained by the interface of auxtrace_record_init() to pass err as a pointer, so I suppose the code in this patch is ok to fit into that.
| |