mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 04:21:03 -04:00
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: Zhu Wang <wangzhu9@huawei.com> Reviewed-by: Simon Horman <horms@kernel.org> Reviewed-by: Horatiu Vultur <horatiu.vultur@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
7740bb882f
commit
86b7e033d6
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user