Skip to content

Commit

Permalink
ASoC: stm32: spdifrx: fix regmap status check
Browse files Browse the repository at this point in the history
commit a168dae upstream.

Release resources when exiting on error.

Fixes: 1a5c0b2 ("ASoC: stm32: spdifrx: manage identification registers")

Signed-off-by: Olivier Moysan <olivier.moysan@st.com>
Link: https://lore.kernel.org/r/20200318144125.9163-2-olivier.moysan@st.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Olivier Moysan authored and Greg Kroah-Hartman committed May 2, 2020
1 parent 9de0528 commit 30f98bd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sound/soc/stm/stm32_spdifrx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,8 @@ static int stm32_spdifrx_probe(struct platform_device *pdev)

if (idr == SPDIFRX_IPIDR_NUMBER) {
ret = regmap_read(spdifrx->regmap, STM32_SPDIFRX_VERR, &ver);
if (ret)
goto error;

dev_dbg(&pdev->dev, "SPDIFRX version: %lu.%lu registered\n",
FIELD_GET(SPDIFRX_VERR_MAJ_MASK, ver),
Expand Down

0 comments on commit 30f98bd

Please sign in to comment.