mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 12:44:03 +02:00
ALSA: hpi: Check transport errors during HPI6000 adapter initialization
create_adapter_obj() retrieves adapter information by calling
hpi6000_message_response_sequence(). This function reports transport-level
errors through its return value and DSP-reported errors via hr0.error.
The current code only checks hr0.error, causing transport-level errors to
be ignored. As a result, adapter initialization may continue with an
invalid response.
Check the return value of hpi6000_message_response_sequence() before
examining hr0.error.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Fixes: 719f82d398 ("ALSA: Add support of AudioScience ASI boards")
Signed-off-by: Evgenii Burenchev <evg28bur@yandex.ru>
Link: https://patch.msgid.link/20260708141147.18253-1-evg28bur@yandex.ru
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
parent
307835a6eb
commit
cc15c32966
|
|
@ -537,6 +537,11 @@ static short create_adapter_obj(struct hpi_adapter_obj *pao,
|
|||
hr1.size = sizeof(hr1);
|
||||
|
||||
error = hpi6000_message_response_sequence(pao, 0, &hm, &hr0);
|
||||
if (error) {
|
||||
HPI_DEBUG_LOG(ERROR, "message transport error %d\n",
|
||||
error);
|
||||
return error;
|
||||
}
|
||||
if (hr0.error) {
|
||||
HPI_DEBUG_LOG(DEBUG, "message error %d\n", hr0.error);
|
||||
return hr0.error;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user