From: Dan Carpenter <dan.carpenter@linaro.org>
To: Baojun Xu <baojun.xu@ti.com>
Cc: Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Nathan Chancellor <nathan@kernel.org>,
linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] ALSA: hda: tas2781-spi: Fix error code in tas2781_read_acpi()
Date: Wed, 22 Jan 2025 10:18:13 +0300 [thread overview]
Message-ID: <6103e81a-13bf-4eab-89af-f6830c14e14c@stanley.mountain> (raw)
In-Reply-To: <cover.1737530177.git.dan.carpenter@linaro.org>
Propagate the error code from devm_gpiod_get_index_optional(). The
current code returns success.
Fixes: bb5f86ea50ff ("ALSA: hda/tas2781: Add tas2781 hda SPI driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
sound/pci/hda/tas2781_hda_spi.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/pci/hda/tas2781_hda_spi.c b/sound/pci/hda/tas2781_hda_spi.c
index 02794fd6003d..eba9c3a3b944 100644
--- a/sound/pci/hda/tas2781_hda_spi.c
+++ b/sound/pci/hda/tas2781_hda_spi.c
@@ -447,6 +447,7 @@ static int tas2781_read_acpi(struct tas2781_hda *tas_hda,
p->reset = devm_gpiod_get_index_optional(physdev, "reset",
p->index, GPIOD_OUT_LOW);
if (IS_ERR(p->reset)) {
+ ret = PTR_ERR(p->reset);
dev_err_probe(p->dev, ret, "Failed on reset GPIO\n");
goto err;
}
--
2.45.2
prev parent reply other threads:[~2025-01-22 7:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1737530177.git.dan.carpenter@linaro.org>
2025-01-22 7:18 ` [PATCH 1/2] ALSA: hda: tas2781-spi: Delete some dead code Dan Carpenter
2025-01-22 7:18 ` Dan Carpenter [this message]
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=6103e81a-13bf-4eab-89af-f6830c14e14c@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=baojun.xu@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=nathan@kernel.org \
--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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®