mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-29 23:24:11 +08:00
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: Dongliang Mu <dzm91@hust.edu.cn> Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
ff0cf7bca6
commit
cbffe6b3b2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user