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] [day] [month] [year] [list]
Message-ID: <bd7daee7-9858-be6e-d640-23c889b7e337@cogentembedded.com>
Date:   Thu, 23 Nov 2017 21:38:34 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>, john@...ozen.org,
        ralf@...ux-mips.org
Cc:     linux-kernel@...r.kernel.org, linux-mips@...ux-mips.org
Subject: Re: [PATCH v2] MIPS: ralink: Fix platform_get_irq's error checking

On 11/23/2017 06:45 PM, Arvind Yadav wrote:

> The platform_get_irq() function returns negative if an error occurs.
> zero or positive number on success. platform_get_irq() error checking
> for zero is not correct.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
> changes in v2: Subject spelling was not correct. change FIX in place
>                 of 'ix'.
> 
>   arch/mips/ralink/timer.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/ralink/timer.c b/arch/mips/ralink/timer.c
> index d4469b2..913dc84b 100644
> --- a/arch/mips/ralink/timer.c
> +++ b/arch/mips/ralink/timer.c
> @@ -109,7 +109,7 @@ static int rt_timer_probe(struct platform_device *pdev)
>   	}
>   
>   	rt->irq = platform_get_irq(pdev, 0);
> -	if (!rt->irq) {
> +	if (rt->irq < 0) {
>   		dev_err(&pdev->dev, "failed to load irq\n");
>   		return -ENOENT;

    Also makes sense to propagate the error instead of -ENOENT...

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ