aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuss Dill <Russ.Dill@gmail.com>2006-02-01 16:07:28 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-02-01 16:07:28 -0500
commit7610dfa3723e87705964b29db9775620d96bf618 (patch)
tree14e05b6c04bd4d0971320d425a30cd71d72a4866
parent18afea04f1dfc5d52fd2579cd17adc3956acd4ad (diff)
[ARM] 3295/1: Fix oprofile init return value
Patch from Russ Dill The oprofile init code was broken in commit c6b9da. The new logic will always return -ENODEV. This fixes oprofile_arch_init to return 0 on success, and return the return value of spec->init() if applicable. Signed-off-by: Russ Dill <Russ.Dill@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--arch/arm/oprofile/common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c
index 1415930ceee1..6f8bc1f0e6a1 100644
--- a/arch/arm/oprofile/common.c
+++ b/arch/arm/oprofile/common.c
@@ -137,8 +137,9 @@ int __init oprofile_arch_init(struct oprofile_operations *ops)
137 if (spec) { 137 if (spec) {
138 init_MUTEX(&op_arm_sem); 138 init_MUTEX(&op_arm_sem);
139 139
140 if (spec->init() < 0) 140 ret = spec->init();
141 return -ENODEV; 141 if (ret < 0)
142 return ret;
142 143
143 op_arm_model = spec; 144 op_arm_model = spec;
144 init_driverfs(); 145 init_driverfs();