[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 <dvrabel@arcom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
305b3228f9
commit
489447380a
@@ -193,8 +193,12 @@ static int gfar_probe(struct platform_device *pdev)
|
||||
priv->interruptTransmit = platform_get_irq_byname(pdev, "tx");
|
||||
priv->interruptReceive = platform_get_irq_byname(pdev, "rx");
|
||||
priv->interruptError = platform_get_irq_byname(pdev, "error");
|
||||
if (priv->interruptTransmit < 0 || priv->interruptReceive < 0 || priv->interruptError < 0)
|
||||
goto regs_fail;
|
||||
} else {
|
||||
priv->interruptTransmit = platform_get_irq(pdev, 0);
|
||||
if (priv->interruptTransmit < 0)
|
||||
goto regs_fail;
|
||||
}
|
||||
|
||||
/* get a pointer to the register memory */
|
||||
|
Reference in New Issue
Block a user