Skip to content

Commit

Permalink
debugobjects: correct the usage of fixup call results
Browse files Browse the repository at this point in the history
If debug_object_fixup() return non-zero when problem has been fixed.
But the code got it backwards, it taks 0 as fixup successfully.  So fix
it.

Signed-off-by: Du, Changbin <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Josh Triplett <[email protected]>
Cc: Steven Rostedt <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Christian Borntraeger <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Du, Changbin authored and torvalds committed May 20, 2016
1 parent b1e4d9d commit e7a8e78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/debugobjects.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ int debug_object_activate(void *addr, struct debug_obj_descr *descr)
state = obj->state;
raw_spin_unlock_irqrestore(&db->lock, flags);
ret = debug_object_fixup(descr->fixup_activate, addr, state);
return ret ? -EINVAL : 0;
return ret ? 0 : -EINVAL;

case ODEBUG_STATE_DESTROYED:
debug_print_object(obj, "activate");
Expand Down

0 comments on commit e7a8e78

Please sign in to comment.