ASoC: pcm: fix error handling when try_module_get() fails.
authorRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Mon, 8 Apr 2019 19:30:25 +0000 (12:30 -0700)
committerMark Brown <broonie@kernel.org>
Wed, 10 Apr 2019 11:28:00 +0000 (12:28 +0100)
commit70802487bb9145a4f8b26f5a11d0e7f83c25100a
treef43925307a15d57372c82db12db1dbb24fd6caf0
parente37c2deafe7058cf7989c4c47bbf1140cc867d89
ASoC: pcm: fix error handling when try_module_get() fails.

Handle error before returning when try_module_get() fails
to prevent inconsistent mutex lock/unlock.

Fixes: 52034add7 (ASoC: pcm: update module refcount if
  module_get_upon_open is set)
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-pcm.c