Revert "ALSA: asihpi: Fix potential OOB array access"

This reverts commit c373c0fcf5.
This commit is contained in:
Ksawlii 2024-11-24 00:23:07 +01:00
parent cb4985654a
commit ca7c9d06a2

View file

@ -713,7 +713,7 @@ static u16 HPIMSGX__init(struct hpi_message *phm,
phr->error = HPI_ERROR_PROCESSING_MESSAGE; phr->error = HPI_ERROR_PROCESSING_MESSAGE;
return phr->error; return phr->error;
} }
if (hr.error == 0 && hr.u.s.adapter_index < HPI_MAX_ADAPTERS) { if (hr.error == 0) {
/* the adapter was created successfully /* the adapter was created successfully
save the mapping for future use */ save the mapping for future use */
hpi_entry_points[hr.u.s.adapter_index] = entry_point_func; hpi_entry_points[hr.u.s.adapter_index] = entry_point_func;