summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2024-11-30 13:08:18 +0300
committerTakashi Iwai <tiwai@suse.de>2024-12-01 09:51:33 +0100
commita0cd2b265fe3f675c121df848aec2e79ff7c100f (patch)
tree09d9912089ba0fabfb3cf39687831db996b6069e /sound
parent3a83f7baf1346aca885cb83cb888e835fef7c472 (diff)
downloadlwn-a0cd2b265fe3f675c121df848aec2e79ff7c100f.tar.gz
lwn-a0cd2b265fe3f675c121df848aec2e79ff7c100f.zip
ALSA: hda/tas2781: Fix error code tas2781_read_acpi()
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> Link: https://patch.msgid.link/ef773f8a-a61d-478b-9e81-41a38a75c77b@stanley.mountain Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/tas2781_hda_i2c.c1
1 files changed, 1 insertions, 0 deletions
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. */