]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dma: of: Remove unnecessary list_empty check
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 25 Mar 2013 13:24:22 +0000 (14:24 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 15 Apr 2013 04:22:04 +0000 (09:52 +0530)
list_for_each_entry is able to handle empty lists just fine, there is no need
to make sure that the list is non empty.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/of-dma.c

index 00db454f70d348e7fe1d38433a1f106938d506de..8266893fef45bd25964ddbe27177163431bfdcfa 100644 (file)
@@ -36,11 +36,6 @@ static struct of_dma *of_dma_get_controller(struct of_phandle_args *dma_spec)
 
        spin_lock(&of_dma_lock);
 
-       if (list_empty(&of_dma_list)) {
-               spin_unlock(&of_dma_lock);
-               return NULL;
-       }
-
        list_for_each_entry(ofdma, &of_dma_list, of_dma_controllers)
                if ((ofdma->of_node == dma_spec->np) &&
                    (ofdma->of_dma_nbcells == dma_spec->args_count)) {