diff options
author | 2021-02-02 12:38:10 +0100 | |
---|---|---|
committer | 2021-02-04 17:13:48 +0100 | |
commit | 9810cad7dad02a3a8ef249b7f8dbb85d2fbb74a1 (patch) | |
tree | 08108d9bcd4f2cbed772e480bd9b871f40fe6e4e /drivers/staging/most | |
parent | staging: most: sound: add sanity check for function argument (diff) | |
download | linux-9810cad7dad02a3a8ef249b7f8dbb85d2fbb74a1.tar.gz linux-9810cad7dad02a3a8ef249b7f8dbb85d2fbb74a1.tar.bz2 linux-9810cad7dad02a3a8ef249b7f8dbb85d2fbb74a1.zip |
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>
Diffstat (limited to 'drivers/staging/most')
-rw-r--r-- | drivers/staging/most/sound/sound.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index 45befb8c1126..52f87a3ef729 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -160,9 +160,9 @@ static struct channel *get_channel(struct most_interface *iface, int channel_id) { 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)) return channel; } |