[PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver
John Garry
john.garry at huawei.com
Thu Apr 14 06:00:44 PDT 2022
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.
More information about the linux-arm-kernel
mailing list