소스 검색

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>
Wei Yongjun 12 년 전
부모
커밋
498c014621
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      drivers/i2c/busses/i2c-pnx.c

+ 2 - 1
drivers/i2c/busses/i2c-pnx.c

@@ -726,7 +726,8 @@ static int i2c_pnx_probe(struct platform_device *pdev)
 	alg_data->irq = platform_get_irq(pdev, 0);
 	if (alg_data->irq < 0) {
 		dev_err(&pdev->dev, "Failed to get IRQ from platform resource\n");
-		goto out_irq;
+		ret = alg_data->irq;
+		goto out_clock;
 	}
 	ret = request_irq(alg_data->irq, i2c_pnx_interrupt,
 			0, pdev->name, alg_data);