• Mark Rutland's avatar
    ARM: perf: handle armpmu_register failing · 76b8a0e4
    Mark Rutland authored
    Currently perf_pmu_register may fail for several reasons (e.g. being
    unable to allocate memory for the struct device it associates with each
    PMU), and while any error is propagated by armpmu_register, it is
    ignored by cpu_pmu_device_probe and not propagated to the caller.  This
    also results in a leak of a struct arm_pmu.
    
    This patch adds cleanup if armpmu_register fails, and updates the info
    messages to better differentiate this type of failure from a failure to
    probe the PMU type from the hardware or dt.
    Signed-off-by: default avatarMark Rutland <mark.rutland@arm.com>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    76b8a0e4
perf_event_cpu.c 7.87 KB