[PATCH 2/2] Fix warning during compilation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: amk <amk@xxxxxxxxxxxxx>

drivers/dma/ipu/ipu_irq.c: In function 'ipu_irq_fn':
drivers/dma/ipu/ipu_irq.c:342:4: warning: 'irq' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: amk <amk@xxxxxxxxxxxxx>
---
 drivers/dma/ipu/ipu_irq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/dma/ipu/ipu_irq.c b/drivers/dma/ipu/ipu_irq.c
index 3f9477c..fae6ef8a 100644
--- a/drivers/dma/ipu/ipu_irq.c
+++ b/drivers/dma/ipu/ipu_irq.c
@@ -330,15 +330,15 @@ static void ipu_irq_fn(struct irq_desc *desc)
 
 			raw_spin_lock(&bank_lock);
 			map = src2map(32 * i + line);
-			if (map)
-				irq = map->irq;
-			raw_spin_unlock(&bank_lock);
 
 			if (!map) {
+				raw_spin_unlock(&bank_lock);
 				pr_err("IPU: Interrupt on unmapped source %u bank %d\n",
 				       line, i);
 				continue;
 			}
+			irq = map->irq;
+			raw_spin_unlock(&bank_lock);
 			generic_handle_irq(irq);
 		}
 	}
-- 
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux