Commit 86b7e033 authored by Zhu Wang's avatar Zhu Wang Committed by David S. Miller

net: lan966x: Do not check 0 for platform_get_irq_byname()

Since platform_get_irq_byname() never returned zero, so it need not to
check whether it returned zero, it returned -EINVAL or -ENXIO when
failed, so we replace the return error code with the result it returned.
Signed-off-by: default avatarZhu Wang <wangzhu9@huawei.com>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Reviewed-by: default avatarHoratiu Vultur <horatiu.vultur@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7740bb88
......@@ -1119,8 +1119,8 @@ static int lan966x_probe(struct platform_device *pdev)
/* set irq */
lan966x->xtr_irq = platform_get_irq_byname(pdev, "xtr");
if (lan966x->xtr_irq <= 0)
return -EINVAL;
if (lan966x->xtr_irq < 0)
return lan966x->xtr_irq;
err = devm_request_threaded_irq(&pdev->dev, lan966x->xtr_irq, NULL,
lan966x_xtr_irq_handler, IRQF_ONESHOT,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment