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]
Date:   Mon, 15 Mar 2021 11:38:10 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...il.com>
To:     Wang Qing <wangqing@...o.com>, Jens Axboe <axboe@...nel.dk>,
        linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V3] ata: sata_highbank: delete redundant print and fix
 return value

Hello!

On 15.03.2021 5:39, Wang Qing wrote:

> platform_get_irq() has already checked and printed the return value,
> the printing here is nothing special, and should corrected to < 0.
> 
> Also, thhe return value should return a real error.

    The.
    It's a bad idea to mix the fix and cleanup in one patch (and to do two 
things in one patch as well); also describing a bug fix as an "appendage"
to the clean up. Anyway, I had already posted the fix here:

https://marc.info/?l=linux-ide&m=161575450917827

> Signed-off-by: Wang Qing <wangqing@...o.com>
> ---
>   drivers/ata/sata_highbank.c | 6 ++----
>   1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/ata/sata_highbank.c b/drivers/ata/sata_highbank.c
> index 64b2ef1..4438ee6
> --- a/drivers/ata/sata_highbank.c
> +++ b/drivers/ata/sata_highbank.c
> @@ -469,10 +469,8 @@ static int ahci_highbank_probe(struct platform_device *pdev)
>   	}
>   
>   	irq = platform_get_irq(pdev, 0);
> -	if (irq <= 0) {
> -		dev_err(dev, "no irq\n");
> -		return -EINVAL;
> -	}
> +	if (irq < 0)
> +		return irq;

    What about irq == 0?
   [...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ