diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-08-22 22:55:51 -0400 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2013-08-28 04:31:33 -0400 |
commit | 498c0146213aa5fbca3b63a6525e91c606c20c5e (patch) | |
tree | d0a90c696b233fee2cffdacbbb6d016adaaf9f84 /drivers/i2c/busses/i2c-pnx.c | |
parent | 370257b287a3959f1d12398b51fb0c50063b4ca8 (diff) |
i2c: pnx: fix error return code in i2c_pnx_probe()
Fix to return a negative error code in the irq get error handling
case instead of 0, as done elsewhere in this function.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
[wsa: fixed wrong exit point, too]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-pnx.c')
-rw-r--r-- | drivers/i2c/busses/i2c-pnx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c index d09577a05d00..1a9ea25f2314 100644 --- a/drivers/i2c/busses/i2c-pnx.c +++ b/drivers/i2c/busses/i2c-pnx.c | |||
@@ -726,7 +726,8 @@ static int i2c_pnx_probe(struct platform_device *pdev) | |||
726 | alg_data->irq = platform_get_irq(pdev, 0); | 726 | alg_data->irq = platform_get_irq(pdev, 0); |
727 | if (alg_data->irq < 0) { | 727 | if (alg_data->irq < 0) { |
728 | dev_err(&pdev->dev, "Failed to get IRQ from platform resource\n"); | 728 | dev_err(&pdev->dev, "Failed to get IRQ from platform resource\n"); |
729 | goto out_irq; | 729 | ret = alg_data->irq; |
730 | goto out_clock; | ||
730 | } | 731 | } |
731 | ret = request_irq(alg_data->irq, i2c_pnx_interrupt, | 732 | ret = request_irq(alg_data->irq, i2c_pnx_interrupt, |
732 | 0, pdev->name, alg_data); | 733 | 0, pdev->name, alg_data); |