From: Russ Dill Date: Wed, 1 Feb 2006 21:07:28 +0000 (+0000) Subject: [ARM] 3295/1: Fix oprofile init return value X-Git-Tag: v2.6.16-rc3~208^2~3 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=7610dfa3723e87705964b29db9775620d96bf618;p=~emulex%2Finfiniband.git [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 Signed-off-by: Russell King --- diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 1415930ceee..6f8bc1f0e6a 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) if (spec) { init_MUTEX(&op_arm_sem); - if (spec->init() < 0) - return -ENODEV; + ret = spec->init(); + if (ret < 0) + return ret; op_arm_model = spec; init_driverfs();