aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/ep93xx_dma.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2016-09-12 14:08:17 -0400
committerVinod Koul <vinod.koul@intel.com>2016-09-14 09:40:46 -0400
commit360af35b08da9def3be8b67398f4e0f90c292e37 (patch)
tree8afea3d372107ddc4f45b4c903fad056f58a0626 /drivers/dma/ep93xx_dma.c
parentaa570be6de67f3772cc850a7bfbe659214aa9ee4 (diff)
dmaengine: cleanup with list_first_entry_or_null()
The combo of list_empty() check and return list_first_entry() can be replaced with list_first_entry_or_null(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/ep93xx_dma.c')
-rw-r--r--drivers/dma/ep93xx_dma.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/dma/ep93xx_dma.c b/drivers/dma/ep93xx_dma.c
index 21f08cc3352b..2ffaca25267e 100644
--- a/drivers/dma/ep93xx_dma.c
+++ b/drivers/dma/ep93xx_dma.c
@@ -262,10 +262,8 @@ static void ep93xx_dma_set_active(struct ep93xx_dma_chan *edmac,
262static struct ep93xx_dma_desc * 262static struct ep93xx_dma_desc *
263ep93xx_dma_get_active(struct ep93xx_dma_chan *edmac) 263ep93xx_dma_get_active(struct ep93xx_dma_chan *edmac)
264{ 264{
265 if (list_empty(&edmac->active)) 265 return list_first_entry_or_null(&edmac->active,
266 return NULL; 266 struct ep93xx_dma_desc, node);
267
268 return list_first_entry(&edmac->active, struct ep93xx_dma_desc, node);
269} 267}
270 268
271/** 269/**