desc was never initialized so dereferencing that pointer would invariably
result in a null pointer exception. The residue must also be initialized
to zero. These changes both fix compiler warnings.
Signed-off-by: Joseph Zavodny <Joseph.Zavodny@jhuapl.edu>
Acked-by: Kedareswara rao Appana <appanad@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
struct dma_tx_state *txstate)
{
struct xilinx_dma_chan *chan = to_xilinx_chan(dchan);
- struct xilinx_dma_tx_descriptor *desc;
+ struct xilinx_dma_tx_descriptor *desc = chan->active_desc;
struct xilinx_dma_tx_segment *segment;
struct xilinx_dma_desc_hw *hw;
enum dma_status ret;
unsigned long flags;
- u32 residue;
+ u32 residue = 0;
ret = dma_cookie_status(dchan, cookie, txstate);
if (ret == DMA_COMPLETE || !txstate)