Skip to content

Commit a0cd2b2

Browse files
Dan Carpentertiwai
authored andcommitted
ALSA: hda/tas2781: Fix error code tas2781_read_acpi()
Return an error code if acpi_get_subsystem_id() fails. Don't return success. Fixes: 4e7035a ("ALSA: hda/tas2781: Add speaker id check for ASUS projects") Signed-off-by: Dan Carpenter <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 3a83f7b commit a0cd2b2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sound/pci/hda/tas2781_hda_i2c.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ static int tas2781_read_acpi(struct tasdevice_priv *p, const char *hid)
143143
sub = acpi_get_subsystem_id(ACPI_HANDLE(physdev));
144144
if (IS_ERR(sub)) {
145145
dev_err(p->dev, "Failed to get SUBSYS ID.\n");
146+
ret = PTR_ERR(sub);
146147
goto err;
147148
}
148149
/* Speaker id was needed for ASUS projects. */

0 commit comments

Comments
 (0)