Skip to contentSkip to conversation

dmaengine: s3c24xx-dma: make phy->irq signed for error handling

PATCH New Dan Carpenter 1 participant 1 message Nov 7, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: s3c24xx-dma: make phy->irq signed for error handling

There is a bug in s3c24xx_dma_probe() where we do:

		phy->irq = platform_get_irq(pdev, i);
		if (phy->irq < 0) {

The problem is that "phy->irq" is unsigned so the error handling doesn't work. I have changed it to signed.

drivers/dma/s3c24xx-dma.c +1 -1
index 4cb1279..63b55f3 100644
@@ -192,7 +192,7 @@ struct s3c24xx_dma_phy {
 	unsigned int			id;
 	bool				valid;
 	void __iomem			*base;
-	unsigned int			irq;
+	int				irq;
 	struct clk			*clk;
 	spinlock_t			lock;
 	struct s3c24xx_dma_chan		*serving;