ASoC: SOF: core: Ensure sof_ops_free() is still called when probe never ran.
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Mon, 9 Oct 2023 11:54:25 +0000 (13:54 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 20 Nov 2023 10:52:06 +0000 (11:52 +0100)
commit002bd3c874da7f1306d82abad6d8517d20f3c588
tree6e34c86c8c874b4362b034817cc506fcb526bcc6
parentfe6efb2d18649fa33d5ed18ead57262f31e9bfb7
ASoC: SOF: core: Ensure sof_ops_free() is still called when probe never ran.

[ Upstream commit f549a82aff57865c47b5abd17336b23cd9bb2d2c ]

In an effort to not call sof_ops_free twice, we stopped running it when
probe was aborted.

Check the result of cancel_work_sync to see if this was the case.

Fixes: 31bb7bd9ffee ("ASoC: SOF: core: Only call sof_ops_free() on remove if the probe was successful")
Cc: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Acked-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://lore.kernel.org/r/20231009115437.99976-2-maarten.lankhorst@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/sof/core.c