summaryrefslogtreecommitdiff
path: root/drivers/dma/pch_dma.c
diff options
context:
space:
mode:
authorLiu Yuan <tailai.ly@taobao.com>2011-04-02 10:20:47 +0400
committerVinod Koul <vinod.koul@intel.com>2011-04-06 12:44:56 +0400
commit364de77831213be20f7f33c39ca1c194593b5c11 (patch)
tree5ea24b348b211946a1f1d4781f2d3fbecf1dbce8 /drivers/dma/pch_dma.c
parent8194145dcc9562387d93054a4fcf79438d3c3e40 (diff)
downloadlinux-364de77831213be20f7f33c39ca1c194593b5c11.tar.xz
drivers, pch_dma: Fix uninitialized var before use
In the function pdc_desc_get(), var 'i' is not initialized before use. This patch fixes it. Signed-off-by: Liu Yuan <tailai.ly@taobao.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/pch_dma.c')
-rw-r--r--drivers/dma/pch_dma.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 8d8fef1480a9..6eebc6205c65 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -403,7 +403,7 @@ static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan)
{
struct pch_dma_desc *desc, *_d;
struct pch_dma_desc *ret = NULL;
- int i;
+ int i = 0;
spin_lock(&pd_chan->lock);
list_for_each_entry_safe(desc, _d, &pd_chan->free_list, desc_node) {