]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - lib/ratelimit.c
ratelimit: fix the return value when __ratelimit() fails to acquire the lock
[karo-tx-linux.git] / lib / ratelimit.c
index b4cd24ff9b29713d27171189b913422c243355e3..027a03f4c56d4059b23560c984f5699e44e069d8 100644 (file)
@@ -40,7 +40,7 @@ int ___ratelimit(struct ratelimit_state *rs, const char *func)
         * the entity that is holding the lock already:
         */
        if (!spin_trylock_irqsave(&rs->lock, flags))
-               return 1;
+               return 0;
 
        if (!rs->begin)
                rs->begin = jiffies;