diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-03-25 09:24:22 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-04-15 00:22:04 -0400 |
commit | af31826d9b1ce432e033f0e91529aa1013076482 (patch) | |
tree | a9f80e9c668e64e9a3b8bf0154656de2e880e143 | |
parent | 9a188eb126aa7bf27077ee46fcb914898d6fc281 (diff) |
dma: of: Remove unnecessary list_empty check
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>
-rw-r--r-- | drivers/dma/of-dma.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/dma/of-dma.c b/drivers/dma/of-dma.c index 00db454f70d3..8266893fef45 100644 --- a/drivers/dma/of-dma.c +++ b/drivers/dma/of-dma.c | |||
@@ -36,11 +36,6 @@ static struct of_dma *of_dma_get_controller(struct of_phandle_args *dma_spec) | |||
36 | 36 | ||
37 | spin_lock(&of_dma_lock); | 37 | spin_lock(&of_dma_lock); |
38 | 38 | ||
39 | if (list_empty(&of_dma_list)) { | ||
40 | spin_unlock(&of_dma_lock); | ||
41 | return NULL; | ||
42 | } | ||
43 | |||
44 | list_for_each_entry(ofdma, &of_dma_list, of_dma_controllers) | 39 | list_for_each_entry(ofdma, &of_dma_list, of_dma_controllers) |
45 | if ((ofdma->of_node == dma_spec->np) && | 40 | if ((ofdma->of_node == dma_spec->np) && |
46 | (ofdma->of_dma_nbcells == dma_spec->args_count)) { | 41 | (ofdma->of_dma_nbcells == dma_spec->args_count)) { |