提交 02da4659 编写于 作者: G Guennadi Liakhovetski 提交者: Mauro Carvalho Chehab

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: NGuennadi Liakhovetski <g.liakhovetski@pengutronix.de>
Signed-off-by: NMauro Carvalho Chehab <mchehab@infradead.org>
上级 7ae1ac4c
...@@ -1019,12 +1019,12 @@ static int pxa_camera_probe(struct platform_device *pdev) ...@@ -1019,12 +1019,12 @@ static int pxa_camera_probe(struct platform_device *pdev)
struct pxa_camera_dev *pcdev; struct pxa_camera_dev *pcdev;
struct resource *res; struct resource *res;
void __iomem *base; void __iomem *base;
unsigned int irq; int irq;
int err = 0; int err = 0;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
irq = platform_get_irq(pdev, 0); irq = platform_get_irq(pdev, 0);
if (!res || !irq) { if (!res || irq < 0) {
err = -ENODEV; err = -ENODEV;
goto exit; goto exit;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册