ASoC: rt5645: add error checking to rt5645_probe function
authorPhillip Potter <phil@philpotter.co.uk>
Mon, 3 May 2021 11:57:22 +0000 (13:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 May 2021 16:32:35 +0000 (18:32 +0200)
commit5e70b8e22b64eed13d5bbebcb5911dae65bf8c6b
tree53c1ab065fad5acc6556f96309ddfe73a070d1d5
parent1e0ce84215dbfd6065872e5d3755352da34f198b
ASoC: rt5645: add error checking to rt5645_probe function

Check for return value from various snd_soc_dapm_* calls, as many of
them can return errors and this should be handled. Also, reintroduce
the allocation failure check for rt5645->eq_param as well. Make all
areas where return values are checked lead to the end of the function
in the case of an error. Finally, introduce a comment explaining how
resources here are actually eventually cleaned up by the caller.

Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Phillip Potter <phil@philpotter.co.uk>
Link: https://lore.kernel.org/r/20210503115736.2104747-56-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/soc/codecs/rt5645.c