Commit 43265cee authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Mark Brown

ASoC: wcd-mbhc-v2: remove always-true condition

cppcheck warning:

'cross_conn<0' is always true [knownConditionTrueFalse]
   } else if (cross_conn < 0) /* Error */
                         ^
'!cross_conn' is not redundant
   } else if (!cross_conn) { /* no cross connection */
              ^
is always true
   } else if (cross_conn < 0) /* Error */
                         ^

sound/soc/codecs/wcd-mbhc-v2.c:1192:26: style: Condition
sound/soc/codecs/wcd-mbhc-v2.c:1188:15: note: Assuming that condition
sound/soc/codecs/wcd-mbhc-v2.c:1192:26: note: Condition 'cross_conn<0'
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: default avatarKai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: default avatarChao Song <chao.song@intel.com>
Link: https://lore.kernel.org/r/20220822184239.169757-3-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent c90d6054
......@@ -1189,7 +1189,7 @@ static void wcd_correct_swch_plug(struct work_struct *work)
pt_gnd_mic_swap_cnt = 0;
plug_type = wcd_mbhc_get_plug_from_adc(mbhc, output_mv);
continue;
} else if (cross_conn < 0) /* Error */
} else /* Error if (cross_conn < 0) */
continue;
if (pt_gnd_mic_swap_cnt == GND_MIC_SWAP_THRESHOLD) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment