Re: [PATCH v7 5/7] perf tool: Add support for HiSilicon PCIe Tune and Trace device driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux