summaryrefslogtreecommitdiff
path: root/sound/soc/stm/stm32_sai.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-04-16 12:02:43 +0200
committerIngo Molnar <mingo@kernel.org>2019-04-16 12:02:43 +0200
commit496156e3647f44e2aab3e64f86b63294afca458a (patch)
treede4c35460ef0249623d45627ad40abad07b8e7cf /sound/soc/stm/stm32_sai.c
parentcabf5ebbabcd4ad59b6eb216876c4c2e56fd3386 (diff)
parent618d919cae2fcaadc752f27ddac8b939da8b441a (diff)
Merge branch 'linus' into perf/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/soc/stm/stm32_sai.c')
-rw-r--r--sound/soc/stm/stm32_sai.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index 14c9591aae42..d68d62f12df5 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -105,6 +105,7 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,
if (!pdev) {
dev_err(&sai_client->pdev->dev,
"Device not found for node %pOFn\n", np_provider);
+ of_node_put(np_provider);
return -ENODEV;
}
@@ -113,19 +114,20 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,
dev_err(&sai_client->pdev->dev,
"SAI sync provider data not found\n");
ret = -EINVAL;
- goto out_put_dev;
+ goto error;
}
/* Configure sync client */
ret = stm32_sai_sync_conf_client(sai_client, synci);
if (ret < 0)
- goto out_put_dev;
+ goto error;
/* Configure sync provider */
ret = stm32_sai_sync_conf_provider(sai_provider, synco);
-out_put_dev:
+error:
put_device(&pdev->dev);
+ of_node_put(np_provider);
return ret;
}