Skip to content

Commit

Permalink
V4L/DVB (8039): pxa-camera: fix platform_get_irq() error handling.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Guennadi Liakhovetski authored and Mauro Carvalho Chehab committed Jun 26, 2008
1 parent 7ae1ac4 commit 02da465
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/media/video/pxa_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 02da465

Please sign in to comment.