mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Vinod Koul <vinod.koul@intel.com>
To: dan.j.williams@intel.com, linux-kernel@vger.kernel.org,
	alan@linux.intel.com, ramesh.b.k.v@intel.com,
	yong.y.wang@linux.intel.com
Cc: Vinod Koul <vinod.koul@intel.com>
Subject: [PATCH 5/6] intel_mid_dma: fix the WARN_ONs
Date: Mon,  4 Oct 2010 16:08:25 +0530	[thread overview]
Message-ID: <1286188705-6305-1-git-send-email-vinod.koul@intel.com> (raw)

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>
---
 drivers/dma/intel_mid_dma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c
index 2ae1086..ef7ffb8 100644
--- a/drivers/dma/intel_mid_dma.c
+++ b/drivers/dma/intel_mid_dma.c
@@ -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);
-- 
1.6.6.1


                 reply	other threads:[~2010-10-04 10:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286188705-6305-1-git-send-email-vinod.koul@intel.com \
    --to=vinod.koul@intel.com \
    --cc=alan@linux.intel.com \
    --cc=dan.j.williams@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ramesh.b.k.v@intel.com \
    --cc=yong.y.wang@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®