Skip to content

Commit

Permalink
[ARM] 3295/1: Fix oprofile init return value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russ Dill authored and Russell King committed Feb 1, 2006
1 parent 18afea0 commit 7610dfa
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions arch/arm/oprofile/common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7610dfa

Please sign in to comment.