diff options
author | Alok Tiwari <alok.a.tiwari@oracle.com> | 2025-06-24 12:43:38 -0700 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2025-07-14 13:36:27 +0100 |
commit | 6ae58c74e7aa9aa6045d82996caa482ef2fdfbc4 (patch) | |
tree | 50b40c0ae3cea70b635ec88a491b5d4ebb39e5e1 | |
parent | ba2ff3e1b640ca7aa0841be3dae94daa6b60bf49 (diff) |
perf/cxlpmu: Fix devm_kcalloc() argument order in cxl_pmu_probe()
The previous code mistakenly swapped the count and size parameters.
This fix corrects the argument order in devm_kcalloc() to follow the
conventional count, size form, avoiding potential confusion or bugs.
Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://lore.kernel.org/r/20250624194350.109790-2-alok.a.tiwari@oracle.com
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | drivers/perf/cxl_pmu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/perf/cxl_pmu.c b/drivers/perf/cxl_pmu.c index d6693519eaee..8998c0a2f3a2 100644 --- a/drivers/perf/cxl_pmu.c +++ b/drivers/perf/cxl_pmu.c @@ -834,8 +834,8 @@ static int cxl_pmu_probe(struct device *dev) if (rc) return rc; - info->hw_events = devm_kcalloc(dev, sizeof(*info->hw_events), - info->num_counters, GFP_KERNEL); + info->hw_events = devm_kcalloc(dev, info->num_counters, + sizeof(*info->hw_events), GFP_KERNEL); if (!info->hw_events) return -ENOMEM; |