From: Guennadi Liakhovetski Date: Fri, 13 Jun 2008 12:03:45 +0000 (-0300) Subject: V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling. X-Git-Tag: v2.6.26-rc9~91^2~20 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=02da465945ae0a277aadf2bf37965a9e6c28f8c3;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/pxa_camera.c b/drivers/media/video/pxa_camera.c index 7cc8e9b19fb..5ec5bb9a94d 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) 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; }