From 489447380a2921ec0e9154f773c44ab3167ede4b Mon Sep 17 00:00:00 2001 From: David Vrabel Date: Thu, 19 Jan 2006 17:56:29 +0000 Subject: [PATCH] handle errors returned by platform_get_irq*() platform_get_irq*() now returns on -ENXIO when the resource cannot be found. Ensure all users of platform_get_irq*() handle this error appropriately. Signed-off-by: David Vrabel Signed-off-by: Greg Kroah-Hartman --- arch/arm/common/locomo.c | 2 ++ arch/arm/common/sa1111.c | 2 ++ 2 files changed, 4 insertions(+) (limited to 'arch/arm') diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c index d31b1cb7eea..23609400a8e 100644 --- a/arch/arm/common/locomo.c +++ b/arch/arm/common/locomo.c @@ -788,6 +788,8 @@ static int locomo_probe(struct platform_device *dev) if (!mem) return -EINVAL; irq = platform_get_irq(dev, 0); + if (irq < 0) + return -ENXIO; return __locomo_probe(&dev->dev, mem, irq); } diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 1475089f9b4..93352f6097c 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c @@ -943,6 +943,8 @@ static int sa1111_probe(struct platform_device *pdev) if (!mem) return -EINVAL; irq = platform_get_irq(pdev, 0); + if (irq < 0) + return -ENXIO; return __sa1111_probe(&pdev->dev, mem, irq); } -- cgit v1.2.3