• Will Deacon's avatar
    ARM: oprofile: fix and simplify init/exit functions · c7fd239a
    Will Deacon authored
    Now that oprofile_arch_exit is only called when the OProfile module
    is unloaded, it can assume that init completed successfully and not
    have to worry about double frees or releasing NULL perf events.
    
    This patch ensures that oprofile_arch_init fails gracefully on ARM
    and simplifies the exit code based on the above.
    
    Cc: Robert Richter <robert.richter@amd.com>
    Cc: Matt Fleming <matt@console-pimps.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ingo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
    Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
    c7fd239a
common.c 9.28 KB