summaryrefslogtreecommitdiffstats
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>2024-07-03 12:15:53 +0200
committerVinod Koul <vkoul@kernel.org>2024-07-09 15:42:48 +0200
commit89cc1354d388ba8c8f8b41095736202a83591497 (patch)
treef5bc5f3812aca066cd7ea74144a4291c20136bbb /drivers/soundwire
parentsoundwire: intel_auxdevice: start the bus at default frequency (diff)
downloadlinux-89cc1354d388ba8c8f8b41095736202a83591497.tar.xz
linux-89cc1354d388ba8c8f8b41095736202a83591497.zip
soundwire: amd: simplify return path in hw_params
Remove unused error path (label+goto) to make the code a bit simpler. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Link: https://lore.kernel.org/r/20240703-soundwire-cleanup-h-v1-1-24fa0dbb948f@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/amd_manager.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/soundwire/amd_manager.c b/drivers/soundwire/amd_manager.c
index 20d94bcfc9b4..97720900818e 100644
--- a/drivers/soundwire/amd_manager.c
+++ b/drivers/soundwire/amd_manager.c
@@ -624,10 +624,8 @@ static int amd_sdw_hw_params(struct snd_pcm_substream *substream,
/* Port configuration */
pconfig = kzalloc(sizeof(*pconfig), GFP_KERNEL);
- if (!pconfig) {
- ret = -ENOMEM;
- goto error;
- }
+ if (!pconfig)
+ return -ENOMEM;
pconfig->num = dai->id;
pconfig->ch_mask = (1 << ch) - 1;
@@ -637,7 +635,7 @@ static int amd_sdw_hw_params(struct snd_pcm_substream *substream,
dev_err(amd_manager->dev, "add manager to stream failed:%d\n", ret);
kfree(pconfig);
-error:
+
return ret;
}