From: Dan Carpenter Date: Thu, 28 Oct 2010 13:41:56 +0000 (+0200) Subject: dma/intel_mid_dma: remove unneeded null check X-Git-Tag: MMI-PSA29.97-13-9~20995^2~12^3~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=66bde0b70aa2e348ac2c9b9626743c1402b9d466;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git dma/intel_mid_dma: remove unneeded null check Smatch complains because we dereference "mid" before checking it. It turns out that "mid" is always a valid pointer here so we can just remove the check. Signed-off-by: Dan Carpenter Signed-off-by: Dan Williams --- diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c index 338bc4eed1f3..41941d05bfb9 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c @@ -1021,11 +1021,6 @@ static irqreturn_t intel_mid_dma_interrupt(int irq, void *data) /*DMA Interrupt*/ pr_debug("MDMA:Got an interrupt on irq %d\n", irq); - if (!mid) { - pr_err("ERR_MDMA:null pointer mid\n"); - return -EINVAL; - } - pr_debug("MDMA: Status %x, Mask %x\n", tfr_status, mid->intr_mask); tfr_status &= mid->intr_mask; if (tfr_status) {