mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-10 15:58:47 +00:00
ALSA: cs4281: remove redundant assignment to variable val and remove a goto
The variable val is being assigned with a value that is never read and it is being updated later with a new value. The assignment is redundant and can be removed. Also remove a goto statement and a label and replace with a break statement. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
bb26e0c636
commit
388b00f045
@ -709,7 +709,7 @@ static int snd_cs4281_trigger(struct snd_pcm_substream *substream, int cmd)
|
|||||||
|
|
||||||
static unsigned int snd_cs4281_rate(unsigned int rate, unsigned int *real_rate)
|
static unsigned int snd_cs4281_rate(unsigned int rate, unsigned int *real_rate)
|
||||||
{
|
{
|
||||||
unsigned int val = ~0;
|
unsigned int val;
|
||||||
|
|
||||||
if (real_rate)
|
if (real_rate)
|
||||||
*real_rate = rate;
|
*real_rate = rate;
|
||||||
@ -722,9 +722,8 @@ static unsigned int snd_cs4281_rate(unsigned int rate, unsigned int *real_rate)
|
|||||||
case 44100: return 1;
|
case 44100: return 1;
|
||||||
case 48000: return 0;
|
case 48000: return 0;
|
||||||
default:
|
default:
|
||||||
goto __variable;
|
break;
|
||||||
}
|
}
|
||||||
__variable:
|
|
||||||
val = 1536000 / rate;
|
val = 1536000 / rate;
|
||||||
if (real_rate)
|
if (real_rate)
|
||||||
*real_rate = 1536000 / val;
|
*real_rate = 1536000 / val;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user