Commit 02da4659 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.

platform_get_irq() returns a negative value on error, not 0.
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 7ae1ac4c
......@@ -1019,12 +1019,12 @@ static int pxa_camera_probe(struct platform_device *pdev)
struct pxa_camera_dev *pcdev;
struct resource *res;
void __iomem *base;
unsigned int irq;
int irq;
int err = 0;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0);
if (!res || !irq) {
if (!res || irq < 0) {
err = -ENODEV;
goto exit;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment