summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-06-13 11:03:45 +0200
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2008-06-13 11:03:45 +0200
commit83b46b2828f77904f8de457d557382b8b16cae0e (patch)
tree9267dec55024add991f1a4dcc313a3ca9df01b4d /linux
parent5d49071dc5848b7556ed9f536a7e671dedc8884e (diff)
downloadmediapointer-dvb-s2-83b46b2828f77904f8de457d557382b8b16cae0e.tar.gz
mediapointer-dvb-s2-83b46b2828f77904f8de457d557382b8b16cae0e.tar.bz2
pxa-camera: fix platform_get_irq() error handling.
From: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de> platform_get_irq() returns a negative value on error, not 0. Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/pxa_camera.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/video/pxa_camera.c b/linux/drivers/media/video/pxa_camera.c
index 7cc8e9b19..5ec5bb9a9 100644
--- a/linux/drivers/media/video/pxa_camera.c
+++ b/linux/drivers/media/video/pxa_camera.c
@@ -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;
}