mirror of
https://github.com/torvalds/linux.git
synced 2024-11-23 20:51:44 +00:00
257aedb72e
When allocations fails that can be NULL now. If the name provided is NULL, then the initialization process of the PMU type and dev will be skipped in function perf_pmu_register(). Consequently, the PMU will not be able to register into the kernel. Moreover, in the case of unregister the PMU, the function device_del() will need to handle NULL pointers, which potentially can cause issues. So move this allocation above the cpuhp_state_add_instance() and directly return if it does fail. Signed-off-by: Junhao He <hejunhao3@huawei.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/20230403081423.62460-3-hejunhao3@huawei.com Signed-off-by: Will Deacon <will@kernel.org> |
||
---|---|---|
.. | ||
hisi_pcie_pmu.c | ||
hisi_uncore_cpa_pmu.c | ||
hisi_uncore_ddrc_pmu.c | ||
hisi_uncore_hha_pmu.c | ||
hisi_uncore_l3c_pmu.c | ||
hisi_uncore_pa_pmu.c | ||
hisi_uncore_pmu.c | ||
hisi_uncore_pmu.h | ||
hisi_uncore_sllc_pmu.c | ||
hns3_pmu.c | ||
Kconfig | ||
Makefile |