Skip to content

Commit 08aa540

Browse files
Tang Binbroonie
authored andcommitted
ASoC: sma1307: Fix invalid logical judgement
In the function sma1307_dai_hw_params_amp, the variable 'ret' has not been assigned a value, so the logical judgement is invalid, thus fix it. Signed-off-by: Tang Bin <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent f3c8897 commit 08aa540

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

sound/soc/codecs/sma1307.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,7 +1191,6 @@ static int sma1307_dai_hw_params_amp(struct snd_pcm_substream *substream,
11911191
struct snd_soc_component *component = dai->component;
11921192
struct sma1307_priv *sma1307 = snd_soc_component_get_drvdata(component);
11931193
unsigned int bclk = 0;
1194-
int ret = 0;
11951194

11961195
if (sma1307->format == SND_SOC_DAIFMT_DSP_A)
11971196
bclk = params_rate(params) * sma1307->frame_size;
@@ -1336,8 +1335,6 @@ static int sma1307_dai_hw_params_amp(struct snd_pcm_substream *substream,
13361335
params_format(params));
13371336
return -EINVAL;
13381337
}
1339-
if (ret < 0)
1340-
return -EINVAL;
13411338

13421339
return 0;
13431340
}

0 commit comments

Comments
 (0)