[PATCH v2 1/3] ASoC: SOF: AMD: simplify return status handling
Ajit Kumar Pandey
AjitKumar.Pandey at amd.com
Tue Dec 21 17:57:57 CET 2021
From: Pierre-Louis Bossart <pierre-louis.bossart at 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 at linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan at intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi at linux.intel.com>
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey at amd.com>
---
sound/soc/sof/amd/acp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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)
--
2.25.1
More information about the Alsa-devel
mailing list