summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2022-09-20 01:57:11 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-24 09:58:26 +0200
commit24ba97974ef3161ec2d8141f1f3d18e6c5b952bc (patch)
treed985adaa3cad61a8e46edad8b2a0f99f0bf324d5
parentd4188d2e2842496354e2a6daa9691a869d6d96c9 (diff)
downloadlinux-stable-24ba97974ef3161ec2d8141f1f3d18e6c5b952bc.tar.gz
linux-stable-24ba97974ef3161ec2d8141f1f3d18e6c5b952bc.zip
soundwire: intel: fix error handling on dai registration issues
[ Upstream commit c6867cda906aadbce5e71efde9c78a26108b2bad ] The call to intel_register_dai() may fail because of memory allocation issues or problems reported by the ASoC core. In all cases, when a error is thrown the component is not registered, it's invalid to unregister it. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Rander Wang <rander.wang@intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://lore.kernel.org/r/20220919175721.354679-2-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/soundwire/intel.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index 505c5ef061e3..865d91ecb862 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -1401,7 +1401,6 @@ int intel_link_startup(struct auxiliary_device *auxdev)
ret = intel_register_dai(sdw);
if (ret) {
dev_err(dev, "DAI registration failed: %d\n", ret);
- snd_soc_unregister_component(dev);
goto err_interrupt;
}