diff mbox series

[v2,1/3] ASoC: SOF: AMD: simplify return status handling

Message ID 20211221165802.236843-1-AjitKumar.Pandey@amd.com
State Superseded
Headers show
Series [v2,1/3] ASoC: SOF: AMD: simplify return status handling | expand

Commit Message

Ajit Kumar Pandey Dec. 21, 2021, 4:57 p.m. UTC
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

cppcheck warning:

sound/soc/sof/amd/acp.c:222:9: warning: Identical condition and return
expression 'ret', return value is always 0
[identicalConditionAfterEarlyExit]
 return ret;
        ^
sound/soc/sof/amd/acp.c:213:6: note: If condition 'ret' is true, the
function will return/exit
 if (ret)
     ^
sound/soc/sof/amd/acp.c:222:9: note: Returning identical expression 'ret'
 return ret;
        ^

Just return 0; on success.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
---
 sound/soc/sof/amd/acp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Brown Dec. 21, 2021, 7:12 p.m. UTC | #1
On Tue, 21 Dec 2021 22:27:57 +0530, Ajit Kumar Pandey wrote:
> From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> 
> cppcheck warning:
> 
> sound/soc/sof/amd/acp.c:222:9: warning: Identical condition and return
> expression 'ret', return value is always 0
> [identicalConditionAfterEarlyExit]
>  return ret;
>         ^
> sound/soc/sof/amd/acp.c:213:6: note: If condition 'ret' is true, the
> function will return/exit
>  if (ret)
>      ^
> sound/soc/sof/amd/acp.c:222:9: note: Returning identical expression 'ret'
>  return ret;
>         ^
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/3] ASoC: SOF: AMD: simplify return status handling
      commit: 2dc643cd756398c3013fcc2d3c2a07c9c4a0a3bd
[2/3] ASoC: amd: acp-config: Enable SOF audio for Google chrome boards.
      commit: f487201343312faa697ac40124085a834e0e26d8
[3/3] ASoC: amd: acp-config: Update sof_tplg_filename for SOF machines
      commit: 0082e3299a49286a7761f4d237530b07c00676fb

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark
diff mbox series

Patch

diff --git a/sound/soc/sof/amd/acp.c b/sound/soc/sof/amd/acp.c
index 4c5550e8d364..fe9b7dc5bc86 100644
--- a/sound/soc/sof/amd/acp.c
+++ b/sound/soc/sof/amd/acp.c
@@ -219,7 +219,7 @@  int configure_and_run_sha_dma(struct acp_dev_data *adata, void *image_addr,
 		return -EINVAL;
 	}
 
-	return ret;
+	return 0;
 }
 
 int acp_dma_status(struct acp_dev_data *adata, unsigned char ch)