mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-07 22:42:04 +00:00
soundwire: intel: fix error handling on dai registration issues
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>
This commit is contained in:
parent
bafb1eacfb
commit
c6867cda90
@ -1432,7 +1432,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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user