mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 07:04:24 +00:00
ASoC: cx2070x: remove duplicate else branch
cppcheck warning: sound/soc/codecs/cx2072x.c:1436:10: style:inconclusive: Found duplicate branches for 'if' and 'else'. [duplicateBranch] } else if (type & 0x4) { ^ sound/soc/codecs/cx2072x.c:1439:5: note: Found duplicate branches for 'if' and 'else'. } else { ^ sound/soc/codecs/cx2072x.c:1436:10: note: Found duplicate branches for 'if' and 'else'. } else if (type & 0x4) { ^ The last two branches do the same thing and can be collapsed together. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Takashi Iwai <tiwai@suse.de> Link: https://lore.kernel.org/r/20210312182246.5153-7-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
4d753b6642
commit
8d41c1ab24
1 changed files with 4 additions and 4 deletions
|
@ -1430,11 +1430,11 @@ static int cx2072x_jack_status_check(void *data)
|
|||
state |= SND_JACK_HEADSET;
|
||||
if (type & 0x2)
|
||||
state |= SND_JACK_BTN_0;
|
||||
} else if (type & 0x4) {
|
||||
/* Nokia headset */
|
||||
state |= SND_JACK_HEADPHONE;
|
||||
} else {
|
||||
/* Headphone */
|
||||
/*
|
||||
* Nokia headset (type & 0x4) and
|
||||
* regular Headphone
|
||||
*/
|
||||
state |= SND_JACK_HEADPHONE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue