[PATCH 5.10/5.15/6.1 0/1] soundwire: stream: use consistent pattern for freeing buffers

From: Daniil Dulov
Date: Mon Mar 04 2024 - 04:56:43 EST


Svacer reports NULL-pointer dereference and double free issues in
do_bank_switch() in case sdw_ml_sync_bank_switch() returns an error
not on the first iteration of the list_for_each_entry() loop. These
problems are present in 5.10, 5.15 and 6.1 stable releases. These problems
have been fixed by the following upstream patch that can be cleanly
applied to 5.10, 5.15 and 6.1 branches.