Skip to contentSkip to conversation

debugobjects: correct the usage of fixup call results

PATCH New [email protected] 1 participant 1 message May 20, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 9/117 debugobjects: correct the usage of fixup call results

From: "Du, Changbin" <[email protected]>
Subject: debugobjects: correct the usage of fixup call results

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.

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]>

---

 lib/debugobjects.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/debugobjects.c renamed from lib/debugobjects.c~debugobjects-correct-the-usage-of-fixup-call-results +1 -1
diff -puN lib/debugobjects.c~debugobjects-correct-the-usage-of-fixup-call-results lib/debugobjects.c
@@ -415,7 +415,7 @@ int debug_object_activate(void *addr, st
 			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");

_