From a61b582954183e93a3dc3a5cf6bfd2e2c3b40aba Mon Sep 17 00:00:00 2001
From: Josip Rodin <joy@entuzijast.net>
Date: Thu, 4 Aug 2011 02:47:40 -0700
Subject: sparc: Fix __atomic_add_unless() return value.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/lib/atomic32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'arch/sparc/lib/atomic32.c')

diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c
index 8600eb2461b..1d32b54089a 100644
--- a/arch/sparc/lib/atomic32.c
+++ b/arch/sparc/lib/atomic32.c
@@ -65,7 +65,7 @@ int __atomic_add_unless(atomic_t *v, int a, int u)
 	if (ret != u)
 		v->counter += a;
 	spin_unlock_irqrestore(ATOMIC_HASH(v), flags);
-	return ret != u;
+	return ret;
 }
 EXPORT_SYMBOL(__atomic_add_unless);
 
-- 
cgit v1.2.3-18-g5258