From: Pierre-Louis Bossart Date: Tue, 2 Mar 2021 00:34:10 +0000 (-0600) Subject: ASoC: SOF: Intel: unregister DMIC device on probe error X-Git-Tag: v5.13-rc1~87^2~19^2^2~164^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=290c323008db6e3a44d981a46b56f7f166979a04;p=thirdparty%2Fkernel%2Flinux.git ASoC: SOF: Intel: unregister DMIC device on probe error 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 Fixes: dd96daca6c83e ("ASoC: SOF: Intel: Add APL/CNL HW DSP support") Signed-off-by: Pierre-Louis Bossart Reviewed-by: Ranjani Sridharan Reviewed-by: Guennadi Liakhovetski Link: https://lore.kernel.org/r/20210302003410.1178535-1-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown --- diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 0dc3a8c0f5e34..001fc9834a19b 100644 --- a/sound/soc/sof/intel/hda.c +++ b/sound/soc/sof/intel/hda.c @@ -895,6 +895,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); hda_codec_i915_exit(sdev); err: