[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200411230943.24951-85-sashal@kernel.org>
Date: Sat, 11 Apr 2020 19:09:20 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Olivier Moysan <olivier.moysan@...com>,
Mark Brown <broonie@...nel.org>,
Sasha Levin <sashal@...nel.org>, alsa-devel@...a-project.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org
Subject: [PATCH AUTOSEL 5.4 085/108] ASoC: stm32: spdifrx: fix regmap status check
From: Olivier Moysan <olivier.moysan@...com>
[ Upstream commit a168dae5ea14283e8992d5282237bb0d6a3e1c06 ]
Release resources when exiting on error.
Fixes: 1a5c0b28fc56 ("ASoC: stm32: spdifrx: manage identification registers")
Signed-off-by: Olivier Moysan <olivier.moysan@...com>
Link: https://lore.kernel.org/r/20200318144125.9163-2-olivier.moysan@st.com
Signed-off-by: Mark Brown <broonie@...nel.org>
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
sound/soc/stm/stm32_spdifrx.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/sound/soc/stm/stm32_spdifrx.c b/sound/soc/stm/stm32_spdifrx.c
index e53fb4bd66b36..9fc2a1767eb1d 100644
--- a/sound/soc/stm/stm32_spdifrx.c
+++ b/sound/soc/stm/stm32_spdifrx.c
@@ -995,6 +995,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),
--
2.20.1
Powered by blists - more mailing lists