diff mbox series

[next] ASoC: cx2072x: remove redundant assignment to pulse_len

Message ID 20190524214419.25075-1-colin.king@canonical.com (mailing list archive)
State Accepted
Commit 9b33d2e526c53b0339ddba8b875bb8b8b3a11207
Headers show
Series [next] ASoC: cx2072x: remove redundant assignment to pulse_len | expand

Commit Message

Colin King May 24, 2019, 9:44 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Variable pulse_len is being initialized to 1 however this value is
never read and pulse_len is being re-assigned later in a switch
statement.  Clean up the code by removing the redundant initialization.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/codecs/cx2072x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Takashi Iwai May 25, 2019, 6:24 a.m. UTC | #1
On Fri, 24 May 2019 23:44:19 +0200,
Colin King wrote:
> 
> From: Colin Ian King <colin.king@canonical.com>
> 
> Variable pulse_len is being initialized to 1 however this value is
> never read and pulse_len is being re-assigned later in a switch
> statement.  Clean up the code by removing the redundant initialization.
> 
> Addresses-Coverity: ("Unused value")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Reviewed-by: Takashi Iwai <tiwai@suse.de>


thanks,

Takashi
diff mbox series

Patch

diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/codecs/cx2072x.c
index 23d2b25fe04c..c11a585bbf70 100644
--- a/sound/soc/codecs/cx2072x.c
+++ b/sound/soc/codecs/cx2072x.c
@@ -679,7 +679,7 @@  static int cx2072x_config_i2spcm(struct cx2072x_priv *cx2072x)
 	int is_right_j = 0;
 	int is_frame_inv = 0;
 	int is_bclk_inv = 0;
-	int pulse_len = 1;
+	int pulse_len;
 	int frame_len = cx2072x->frame_size;
 	int sample_size = cx2072x->sample_size;
 	int i2s_right_slot;