aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeel Chauhan <nc@FreeBSD.org>2021-04-26 15:25:33 +0000
committerNeel Chauhan <nc@FreeBSD.org>2021-04-26 15:25:33 +0000
commite657f3de6dc29147b5373d2cc2cc47e580931e30 (patch)
tree7b917155b2d9fc2f5133abef278ad1f23beabeae
parentc8de6e20150a3c10575a27532a25b00342a7f452 (diff)
downloadsrc-e657f3de6dc29147b5373d2cc2cc47e580931e30.tar.gz
src-e657f3de6dc29147b5373d2cc2cc47e580931e30.zip
linuxkpi: Remove unneeded {} in atomic_dec_and_lock_irqsave()
-rw-r--r--sys/compat/linuxkpi/common/include/linux/spinlock.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/spinlock.h b/sys/compat/linuxkpi/common/include/linux/spinlock.h
index 1ad8f8ff1aad..83f45b1a2a40 100644
--- a/sys/compat/linuxkpi/common/include/linux/spinlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/spinlock.h
@@ -166,9 +166,8 @@ atomic_dec_and_lock_irqsave(atomic_t *cnt, spinlock_t *lock,
unsigned long flags)
{
spin_lock_irqsave(lock, flags);
- if (atomic_dec_and_test(cnt)) {
+ if (atomic_dec_and_test(cnt))
return 1;
- }
spin_unlock_irqrestore(lock, flags);
return 0;
}