]> git.baikalelectronics.ru Git - kernel.git/commit
oprofile: don't call arch exit code from init code on failure
authorWill Deacon <will.deacon@arm.com>
Sun, 29 Aug 2010 18:51:59 +0000 (14:51 -0400)
committerRobert Richter <robert.richter@amd.com>
Tue, 31 Aug 2010 09:47:50 +0000 (11:47 +0200)
commit96b561ba16ce234ecbb5e668f912643e98f8052c
tree28c6e5c6c11343f934249cfdf9cc806f8a587758
parent9ab69c9126494bbcd09e617bb6a99a8f0009a186
oprofile: don't call arch exit code from init code on failure

oprofile_init calls oprofile_arch_init to initialise the architecture-specific
backend code. If this backend code returns failure, oprofile_arch_exit is
called immediately, making it difficult to allocate and free resources
correctly.

This patch removes the oprofile_arch_exit call from oprofile_init,
meaning that all architectures must ensure that oprofile_arch_init
cleans up any mess it's made before returning an error. As far as
I can tell, this only affects the code for ARM.

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: Will Deacon <will.deacon@arm.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
drivers/oprofile/oprof.c