Skip to content

Commit

Permalink
drivers, pch_dma: Fix uninitialized var before use
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Liu Yuan authored and Vinod Koul committed Apr 6, 2011
1 parent 8194145 commit 364de77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/pch_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 364de77

Please sign in to comment.