aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-iop3xx.c
diff options
context:
space:
mode:
authorDavid Vrabel <dvrabel@arcom.com>2006-01-19 12:56:29 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2006-03-20 16:42:57 -0500
commit489447380a2921ec0e9154f773c44ab3167ede4b (patch)
tree10edc2bca15765dae7699b8d26cf3d828869bc3c /drivers/i2c/busses/i2c-iop3xx.c
parent305b3228f9ff4d59f49e6d34a7034d44ee8ce2f0 (diff)
[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>
Diffstat (limited to 'drivers/i2c/busses/i2c-iop3xx.c')
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c
index 1414851a17b8..d00a02fc23e4 100644
--- a/drivers/i2c/busses/i2c-iop3xx.c
+++ b/drivers/i2c/busses/i2c-iop3xx.c
@@ -434,7 +434,7 @@ static int
434iop3xx_i2c_probe(struct platform_device *pdev) 434iop3xx_i2c_probe(struct platform_device *pdev)
435{ 435{
436 struct resource *res; 436 struct resource *res;
437 int ret; 437 int ret, irq;
438 struct i2c_adapter *new_adapter; 438 struct i2c_adapter *new_adapter;
439 struct i2c_algo_iop3xx_data *adapter_data; 439 struct i2c_algo_iop3xx_data *adapter_data;
440 440
@@ -470,7 +470,12 @@ iop3xx_i2c_probe(struct platform_device *pdev)
470 goto release_region; 470 goto release_region;
471 } 471 }
472 472
473 ret = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0, 473 irq = platform_get_irq(pdev, 0);
474 if (irq < 0) {
475 ret = -ENXIO;
476 goto unmap;
477 }
478 ret = request_irq(irq, iop3xx_i2c_irq_handler, 0,
474 pdev->name, adapter_data); 479 pdev->name, adapter_data);
475 480
476 if (ret) { 481 if (ret) {