staging: most: cdev: simplify list iteration
authorChristian Gromm <christian.gromm@microchip.com>
Mon, 22 Jun 2020 08:48:15 +0000 (10:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jun 2020 13:40:28 +0000 (15:40 +0200)
commit0ae9e4f22d1c046e53ad2eb0a8a8c3d9e441fd3d
treed774e09f813ba428be717295ea6db5ee44947277
parent78aee6516670d1f8f4e74e5982ea8d557f114b2b
staging: most: cdev: simplify list iteration

This patch uses a less confusing list traversing structure to
either return an item of the list that meets the prerequisites
or NULL otherwise.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Link: https://lore.kernel.org/r/1592815695-19305-7-git-send-email-christian.gromm@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/cdev/cdev.c