[PATCH next] ALSA: hda/tas2781: Fix error code tas2781_read_acpi()

Dan Carpenter posted 1 patch 1 year, 2 months ago
sound/pci/hda/tas2781_hda_i2c.c | 1 +
1 file changed, 1 insertion(+)
[PATCH next] ALSA: hda/tas2781: Fix error code tas2781_read_acpi()
Posted by Dan Carpenter 1 year, 2 months ago
Return an error code if acpi_get_subsystem_id() fails.  Don't return
success.

Fixes: 4e7035a75da9 ("ALSA: hda/tas2781: Add speaker id check for ASUS projects")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 sound/pci/hda/tas2781_hda_i2c.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/tas2781_hda_i2c.c b/sound/pci/hda/tas2781_hda_i2c.c
index 45cfb5a6f309..8ec03bda85f3 100644
--- a/sound/pci/hda/tas2781_hda_i2c.c
+++ b/sound/pci/hda/tas2781_hda_i2c.c
@@ -143,6 +143,7 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
 	sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
 	if (IS_ERR(sub)) {
 		dev_err(p->dev, "Failed to get SUBSYS ID.\n");
+		ret = PTR_ERR(sub);
 		goto err;
 	}
 	/* Speaker id was needed for ASUS projects. */
-- 
2.45.2
Re: [PATCH next] ALSA: hda/tas2781: Fix error code tas2781_read_acpi()
Posted by Takashi Iwai 1 year, 2 months ago
On Sat, 30 Nov 2024 11:08:18 +0100,
Dan Carpenter wrote:
> 
> Return an error code if acpi_get_subsystem_id() fails.  Don't return
> success.
> 
> Fixes: 4e7035a75da9 ("ALSA: hda/tas2781: Add speaker id check for ASUS projects")
> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>

Thanks, applied now.


Takashi