aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pxa_camera.c
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>2008-06-13 08:03:45 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-26 14:58:50 -0400
commit02da465945ae0a277aadf2bf37965a9e6c28f8c3 (patch)
treefc262b379d5ca2fc448d74606cbbe40354a72b09 /drivers/media/video/pxa_camera.c
parent7ae1ac4c1db5a3647604acb00d736f17af6999b7 (diff)
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: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/pxa_camera.c')
-rw-r--r--drivers/media/video/pxa_camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c
index 7cc8e9b19fb7..5ec5bb9a94d2 100644
--- a/drivers/media/video/pxa_camera.c
+++ b/drivers/media/video/pxa_camera.c
@@ -1019,12 +1019,12 @@ static int pxa_camera_probe(struct platform_device *pdev)
1019 struct pxa_camera_dev *pcdev; 1019 struct pxa_camera_dev *pcdev;
1020 struct resource *res; 1020 struct resource *res;
1021 void __iomem *base; 1021 void __iomem *base;
1022 unsigned int irq; 1022 int irq;
1023 int err = 0; 1023 int err = 0;
1024 1024
1025 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1025 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1026 irq = platform_get_irq(pdev, 0); 1026 irq = platform_get_irq(pdev, 0);
1027 if (!res || !irq) { 1027 if (!res || irq < 0) {
1028 err = -ENODEV; 1028 err = -ENODEV;
1029 goto exit; 1029 goto exit;
1030 } 1030 }