aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2021-03-01 18:34:10 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-03-24 11:26:36 +0100
commit626a484d1ec2eb2c2cb2d07e670b1c1eb3382cb8 (patch)
treebf029c68e0b7831dedb443978ab9b4e64265601f
parentdb3d39bcd66a14579785191fa4893964bfbd2be4 (diff)
downloadlinux-yocto-626a484d1ec2eb2c2cb2d07e670b1c1eb3382cb8.tar.gz
linux-yocto-626a484d1ec2eb2c2cb2d07e670b1c1eb3382cb8.tar.bz2
linux-yocto-626a484d1ec2eb2c2cb2d07e670b1c1eb3382cb8.zip
ASoC: SOF: Intel: unregister DMIC device on probe error
commit 5bb0ecddb2a7f638d65e457f3da9fa334c967b14 upstream. We only unregister the platform device during the .remove operation, but if the probe fails we will never reach this sequence. Suggested-by: Bard Liao <yung-chuan.liao@linux.intel.com> Fixes: dd96daca6c83e ("ASoC: SOF: Intel: Add APL/CNL HW DSP support") Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com> Link: https://lore.kernel.org/r/20210302003410.1178535-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--sound/soc/sof/intel/hda.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index 3c4b604412f0..a10166741865 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -672,6 +672,7 @@ free_streams:
/* dsp_unmap: not currently used */
iounmap(sdev->bar[HDA_DSP_BAR]);
hdac_bus_unmap:
+ platform_device_unregister(hdev->dmic_dev);
iounmap(bus->remap_addr);
err:
return ret;