mirror of
https://github.com/torvalds/linux
synced 2024-10-03 09:48:02 +00:00
staging: most: sound: use non-safe list iteration
This patch replaces the safe list iteration function with the non-safe one, as no list element is being deleted. Signed-off-by: Christian Gromm <christian.gromm@microchip.com> Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/1612265890-18246-3-git-send-email-christian.gromm@microchip.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
45b754ae5b
commit
9810cad7da
|
@ -160,9 +160,9 @@ static struct channel *get_channel(struct most_interface *iface,
|
||||||
int channel_id)
|
int channel_id)
|
||||||
{
|
{
|
||||||
struct sound_adapter *adpt = iface->priv;
|
struct sound_adapter *adpt = iface->priv;
|
||||||
struct channel *channel, *tmp;
|
struct channel *channel;
|
||||||
|
|
||||||
list_for_each_entry_safe(channel, tmp, &adpt->dev_list, list) {
|
list_for_each_entry(channel, &adpt->dev_list, list) {
|
||||||
if ((channel->iface == iface) && (channel->id == channel_id))
|
if ((channel->iface == iface) && (channel->id == channel_id))
|
||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue