V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Fri, 13 Jun 2008 12:03:45 +0000 (09:03 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 26 Jun 2008 18:58:50 +0000 (15:58 -0300)
platform_get_irq() returns a negative value on error, not 0.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/pxa_camera.c

index 7cc8e9b19fb794fb57139515692de6d460afbd96..5ec5bb9a94d2e848095d8e737eb2936e6803b14d 100644 (file)
@@ -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;
        }