Message ID | 20230802085216.659238-1-ruanjinjie@huawei.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6abce66ba953a0f8ed97559709a2a567f95f560a |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net-next] net: gemini: Do not check for 0 return after calling platform_get_irq() | expand |
On 8/2/2023 1:52 AM, Ruan Jinjie wrote: > It is not possible for platform_get_irq() to return 0. Use the > return value from platform_get_irq(). > > Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> These would likely have been better sent as a series (with the right maintainers added to each patch) instead of 1 by 1 patches for all the changes with platform_get_irq() code. Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Hello: This patch was applied to netdev/net-next.git (main) by Paolo Abeni <pabeni@redhat.com>: On Wed, 2 Aug 2023 16:52:16 +0800 you wrote: > It is not possible for platform_get_irq() to return 0. Use the > return value from platform_get_irq(). > > Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> > --- > drivers/net/ethernet/cortina/gemini.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Here is the summary with links: - [net-next] net: gemini: Do not check for 0 return after calling platform_get_irq() https://git.kernel.org/netdev/net-next/c/6abce66ba953 You are awesome, thank you!
diff --git a/drivers/net/ethernet/cortina/gemini.c b/drivers/net/ethernet/cortina/gemini.c index 5715b9ab2712..692cb2d04c1c 100644 --- a/drivers/net/ethernet/cortina/gemini.c +++ b/drivers/net/ethernet/cortina/gemini.c @@ -2415,8 +2415,8 @@ static int gemini_ethernet_port_probe(struct platform_device *pdev) /* Interrupt */ irq = platform_get_irq(pdev, 0); - if (irq <= 0) - return irq ? irq : -ENODEV; + if (irq < 0) + return irq; port->irq = irq; /* Clock the port */
It is not possible for platform_get_irq() to return 0. Use the return value from platform_get_irq(). Signed-off-by: Ruan Jinjie <ruanjinjie@huawei.com> --- drivers/net/ethernet/cortina/gemini.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)