[PATCH] ASoC: fsl_micfil: Fix format and unused assignment

Subsystems: freescale soc sound drivers, sound, sound - soc layer / dynamic audio power management (asoc), the rest

STALE2271d

3 messages, 2 authors, 2020-05-18 · open the first message on its own page

[PATCH] ASoC: fsl_micfil: Fix format and unused assignment

From: Tang Bin <hidden>
Date: 2020-05-18 07:44:27

In the function fsl_micfil_startup(), the two lines of dev_err()
can be shortened to one line. And delete unused initialized value
of 'ret', because it will be assigned by the function
fsl_micfil_set_mclk_rate().

Signed-off-by: Tang Bin <redacted>
---
 sound/soc/fsl/fsl_micfil.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/fsl/fsl_micfil.c b/sound/soc/fsl/fsl_micfil.c
index f7f2d29f1..a7a6118be 100644
--- a/sound/soc/fsl/fsl_micfil.c
+++ b/sound/soc/fsl/fsl_micfil.c
@@ -217,8 +217,7 @@ static int fsl_micfil_startup(struct snd_pcm_substream *substream,
 	struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai);
 
 	if (!micfil) {
-		dev_err(dai->dev,
-			"micfil dai priv_data not set\n");
+		dev_err(dai->dev, "micfil dai priv_data not set\n");
 		return -EINVAL;
 	}
 
@@ -296,7 +295,7 @@ static int fsl_set_clock_params(struct device *dev, unsigned int rate)
 {
 	struct fsl_micfil *micfil = dev_get_drvdata(dev);
 	int clk_div;
-	int ret = 0;
+	int ret;
 
 	ret = fsl_micfil_set_mclk_rate(micfil, rate);
 	if (ret < 0)
-- 
2.20.1.windows.1


Re: [PATCH] ASoC: fsl_micfil: Fix format and unused assignment

From: Mark Brown <broonie@kernel.org>
Date: 2020-05-18 10:25:18

On Mon, May 18, 2020 at 03:44:05PM +0800, Tang Bin wrote:
In the function fsl_micfil_startup(), the two lines of dev_err()
can be shortened to one line. And delete unused initialized value
of 'ret', because it will be assigned by the function
fsl_micfil_set_mclk_rate().
This is two separate changes with no overlap so would have been better
sent as separate patches.

Re: [PATCH] ASoC: fsl_micfil: Fix format and unused assignment

From: Tang Bin <hidden>
Date: 2020-05-18 10:46:33

On 2020/5/18 18:25, Mark Brown wrote:
On Mon, May 18, 2020 at 03:44:05PM +0800, Tang Bin wrote:
quoted
In the function fsl_micfil_startup(), the two lines of dev_err()
can be shortened to one line. And delete unused initialized value
of 'ret', because it will be assigned by the function
fsl_micfil_set_mclk_rate().
This is two separate changes with no overlap so would have been better
sent as separate patches.
Got it, Thanks

Tang Bin


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help