Commit cbffe6b3 authored by Dongliang Mu's avatar Dongliang Mu Committed by Wolfram Sang
Browse files

i2c: davinci: remove dead code in probe



From the comment of platform_get_irq, it only returns non-zero IRQ
number and negative error number, other than zero.

Fix this by removing the if condition.

Signed-off-by: default avatarDongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: default avatarWolfram Sang <wsa@kernel.org>
parent ff0cf7bc
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -764,11 +764,8 @@ static int davinci_i2c_probe(struct platform_device *pdev)
	int r, irq;

	irq = platform_get_irq(pdev, 0);
	if (irq <= 0) {
		if (!irq)
			irq = -ENXIO;
	if (irq < 0)
		return dev_err_probe(&pdev->dev, irq, "can't get irq resource\n");
	}

	dev = devm_kzalloc(&pdev->dev, sizeof(struct davinci_i2c_dev),
			GFP_KERNEL);