diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-iop3xx.c')
-rw-r--r-- | drivers/i2c/busses/i2c-iop3xx.c | 9 |
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 iop3xx_i2c_probe(struct platform_device *pdev) { struct resource *res; - int ret; + int ret, irq; struct i2c_adapter *new_adapter; struct i2c_algo_iop3xx_data *adapter_data; @@ -470,7 +470,12 @@ iop3xx_i2c_probe(struct platform_device *pdev) goto release_region; } - ret = request_irq(platform_get_irq(pdev, 0), iop3xx_i2c_irq_handler, 0, + irq = platform_get_irq(pdev, 0); + if (irq < 0) { + ret = -ENXIO; + goto unmap; + } + ret = request_irq(irq, iop3xx_i2c_irq_handler, 0, pdev->name, adapter_data); if (ret) { |