Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7effdbd6 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Felipe Balbi
Browse files

usb: musb: musbhsdma: fix IRQ check



dma_controller_create() in this MUSB DMA driver only regards 0 as a wrong IRQ
number, despite platform_get_irq_byname() that it calls returns -ENXIO in that
case. It leads to calling request_irq() with a negative IRQ number, and when it
naturally fails, the following is printed to the console:

request_irq -6 failed!

and the DMA controller is not created.

Fix this function to filter out the error values as well as 0.

Signed-off-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent ff41aaa3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -388,7 +388,7 @@ dma_controller_create(struct musb *musb, void __iomem *base)
	struct platform_device *pdev = to_platform_device(dev);
	struct platform_device *pdev = to_platform_device(dev);
	int irq = platform_get_irq_byname(pdev, "dma");
	int irq = platform_get_irq_byname(pdev, "dma");


	if (irq == 0) {
	if (irq <= 0) {
		dev_err(dev, "No DMA interrupt line!\n");
		dev_err(dev, "No DMA interrupt line!\n");
		return NULL;
		return NULL;
	}
	}