From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Matthias Schiffer <matthias.schiffer@ew.tq-group.com> Subject: [PATCH 1/2] ASoC: codec: tlv320aic32x4: fix missing aic32x4_disable_regulators() in error path Date: Wed, 2 Sep 2020 15:30:42 +0200 [thread overview] Message-ID: <20200902133043.19504-1-matthias.schiffer@ew.tq-group.com> (raw) The regulators need to be disabled in the aic32x4_register_clocks() failure case as well. Fixes: 9d4befff5a95 ("ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset") Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> --- sound/soc/codecs/tlv320aic32x4.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 8dcea566b375..a45fb496082c 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -1230,8 +1230,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) &soc_component_dev_aic32x4, &aic32x4_dai, 1); if (ret) { dev_err(dev, "Failed to register component\n"); - aic32x4_disable_regulators(aic32x4); - return ret; + goto err_disable_regulators; } if (gpio_is_valid(aic32x4->rstn_gpio)) { @@ -1242,9 +1241,14 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) ret = aic32x4_register_clocks(dev, aic32x4->mclk_name); if (ret) - return ret; + goto err_disable_regulators; return 0; + +err_disable_regulators: + aic32x4_disable_regulators(aic32x4); + + return ret; } EXPORT_SYMBOL(aic32x4_probe); -- 2.17.1
WARNING: multiple messages have this Message-ID (diff)
From: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> To: Liam Girdwood <lgirdwood@gmail.com>, Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com> Cc: alsa-devel@alsa-project.org, Matthias Schiffer <matthias.schiffer@ew.tq-group.com>, Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>, linux-kernel@vger.kernel.org Subject: [PATCH 1/2] ASoC: codec: tlv320aic32x4: fix missing aic32x4_disable_regulators() in error path Date: Wed, 2 Sep 2020 15:30:42 +0200 [thread overview] Message-ID: <20200902133043.19504-1-matthias.schiffer@ew.tq-group.com> (raw) The regulators need to be disabled in the aic32x4_register_clocks() failure case as well. Fixes: 9d4befff5a95 ("ASoC: codec: tlv3204: Moving GPIO reset and add ADC reset") Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com> --- sound/soc/codecs/tlv320aic32x4.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 8dcea566b375..a45fb496082c 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -1230,8 +1230,7 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) &soc_component_dev_aic32x4, &aic32x4_dai, 1); if (ret) { dev_err(dev, "Failed to register component\n"); - aic32x4_disable_regulators(aic32x4); - return ret; + goto err_disable_regulators; } if (gpio_is_valid(aic32x4->rstn_gpio)) { @@ -1242,9 +1241,14 @@ int aic32x4_probe(struct device *dev, struct regmap *regmap) ret = aic32x4_register_clocks(dev, aic32x4->mclk_name); if (ret) - return ret; + goto err_disable_regulators; return 0; + +err_disable_regulators: + aic32x4_disable_regulators(aic32x4); + + return ret; } EXPORT_SYMBOL(aic32x4_probe); -- 2.17.1
next reply other threads:[~2020-09-02 15:47 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-09-02 13:30 Matthias Schiffer [this message] 2020-09-02 13:30 ` [PATCH 1/2] ASoC: codec: tlv320aic32x4: fix missing aic32x4_disable_regulators() in error path Matthias Schiffer 2020-09-02 13:30 ` [PATCH 2/2] ASoC: codec: tlv320aic32x4: do software reset before clock registration Matthias Schiffer 2020-09-02 13:30 ` Matthias Schiffer 2020-09-17 18:56 ` [PATCH 1/2] ASoC: codec: tlv320aic32x4: fix missing aic32x4_disable_regulators() in error path Mark Brown
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20200902133043.19504-1-matthias.schiffer@ew.tq-group.com \ --to=matthias.schiffer@ew.tq-group.com \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=lgirdwood@gmail.com \ --cc=linux-kernel@vger.kernel.org \ --cc=michael.wei.hong.sit@intel.com \ --cc=perex@perex.cz \ --cc=tiwai@suse.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.