lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 3 Aug 2023 21:41:06 +0200
From: Horatiu Vultur <horatiu.vultur@...rochip.com>
To: Zhu Wang <wangzhu9@...wei.com>
CC: <UNGLinuxDriver@...rochip.com>, <davem@...emloft.net>,
	<edumazet@...gle.com>, <kuba@...nel.org>, <pabeni@...hat.com>,
	<netdev@...r.kernel.org>
Subject: Re: [PATCH -next] net: lan966x: Do not check 0 for
 platform_get_irq_byname()

The 08/03/2023 16:29, Zhu Wang wrote:
> [Some people who received this message don't often get email from wangzhu9@...wei.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
> 
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> 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@...wei.com>

Reviewed-by: Horatiu Vultur <horatiu.vultur@...rochip.com>

> ---
>  drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> index fbb0bb4594cd..824961ec1370 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> @@ -1108,8 +1108,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,
> --
> 2.17.1
> 

-- 
/Horatiu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ