drivers, pch_dma: Fix uninitialized var before use
PATCH 1/1 drivers, pch_dma: Fix uninitialized var before use
From: Liu Yuan <[email protected]>
In the function pdc_desc_get(), var 'i' is not
initialized before use. This patch fixes it.
Signed-off-by Liu Yuan <[email protected]>
--- drivers/dma/pch_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/dma/pch_dma.c +1 -1
@@ -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) {
Signature · 1 line
1.7.1
Koul, Vinod
AppliedQuoted 15 lines · Liu Yuan
From: Liu Yuan <[email protected]>
In the function
pdc_desc_get(), var 'i' is not
initialized before use. This patch fixes it.Signed-off-by Liu Yuan <[email protected]>--- drivers/dma/pch_dma.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)drivers/dma/pch_dma.c +0
-0
drivers/dma/pch_dma.c static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan) · line 409
Quoted 8 lines
drivers/dma/pch_dma.c +1
-1@@ -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) {
Applied, Thanks
Signature · 1 line
~Vinod