]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
intel_mid_dma: fix the WARN_ONs
authorKoul, Vinod <vinod.koul@intel.com>
Mon, 4 Oct 2010 10:38:25 +0000 (10:38 +0000)
committerDan Williams <dan.j.williams@intel.com>
Thu, 7 Oct 2010 22:03:43 +0000 (15:03 -0700)
Moved the WARN_ON to BUG_ON, as WARN_ON if hit,
can cause null pointer derefrences

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/dma/intel_mid_dma.c

index 2ae1086b9481d58811a79a139a05d58780c814c5..ef7ffb813fe9d519ce6c52a248bc573275f4b3dd 100644 (file)
@@ -581,15 +581,15 @@ static struct dma_async_tx_descriptor *intel_mid_dma_prep_memcpy(
        enum intel_mid_dma_width width = 0;
 
        pr_debug("MDMA: Prep for memcpy\n");
-       WARN_ON(!chan);
+       BUG_ON(!chan);
        if (!len)
                return NULL;
 
        mids = chan->private;
-       WARN_ON(!mids);
+       BUG_ON(!mids);
 
        midc = to_intel_mid_dma_chan(chan);
-       WARN_ON(!midc);
+       BUG_ON(!midc);
 
        pr_debug("MDMA:called for DMA %x CH %d Length %zu\n",
                                midc->dma->pci_id, midc->ch_id, len);