Skip to contentSkip to conversation

SoC: nau8825: remove unnecessary unlikely()

PATCH New Yangtao Li 1 participant 1 message Nov 4, 2018

Subsystems (2)
lore
Share & tools
lore

Yangtao Li

author
#0 lore raw

PATCH 1/1 SoC: nau8825: remove unnecessary unlikely()

WARN_ON() already contains an unlikely(), so it's not necessary to use unlikely.

---
 sound/soc/codecs/nau8825.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
sound/soc/codecs/nau8825.c +1 -3
index b9fed99d8b5e..7bbcbf5f05c8 100644
@@ -424,10 +424,8 @@ static u32 nau8825_xtalk_sidetone(u32 sig_org, u32 sig_cros)
 {
 	u32 gain, sidetone;
 
-	if (unlikely(sig_org == 0) || unlikely(sig_cros == 0)) {
-		WARN_ON(1);
+	if (WARN_ON(sig_org == 0 || sig_cros == 0))
 		return 0;
-	}
 
 	sig_org = nau8825_intlog10_dec3(sig_org);
 	sig_cros = nau8825_intlog10_dec3(sig_cros);
Signature · 1 line
2.17.0