ASoC: SOF: Intel: hda: Simplify error handling during FW boot
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Wed, 26 Aug 2020 18:45:32 +0000 (11:45 -0700)
committerMark Brown <broonie@kernel.org>
Thu, 27 Aug 2020 13:22:24 +0000 (14:22 +0100)
commit01d42d5a0a70bdcece7228232590f177e7114368
tree8204d06288311b83a96325cb8bc36c5fc1e4a4f0
parent8b98491a6b8c41a7e4334fb94a58c268d831458e
ASoC: SOF: Intel: hda: Simplify error handling during FW boot

Modify cl_stream_prepare() to return a pointer to the prepared stream
if successful or ERR_PTR() otherwise. This would simplify the error
paths in hda_dsp_cl_boot_firmware() and hda_dsp_cl_boot_firmware_iccmax()
to perform the stream cleanup after FW boot. This change also renders
the function get_stream_with_tag() redundant.

Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20200826184532.1612070-9-ranjani.sridharan@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-loader.c