mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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>
This commit is contained in:
parent
7ae1ac4c1d
commit
02da465945
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue