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]
Message-ID: <1a92f43b-5358-169f-7dd8-1860a26d9861@ti.com>
Date:   Thu, 27 Aug 2020 10:13:16 +0300
From:   Tero Kristo <t-kristo@...com>
To:     Krzysztof Kozlowski <krzk@...nel.org>,
        Stefan Schaeckeler <sschaeck@...co.com>,
        Borislav Petkov <bp@...en8.de>,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Tony Luck <tony.luck@...el.com>,
        James Morse <james.morse@....com>,
        Robert Richter <rric@...nel.org>,
        Joel Stanley <joel@....id.au>,
        Andrew Jeffery <andrew@...id.au>, <linux-edac@...r.kernel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-aspeed@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/2] EDAC/ti: Fix handling of platform_get_irq() error

On 27/08/2020 10:07, Krzysztof Kozlowski wrote:
> platform_get_irq() returns -ERRNO on error.  In such case comparison
> to 0 would pass the check.
> 
> Fixes: 86a18ee21e5e ("EDAC, ti: Add support for TI keystone and DRA7xx EDAC")
> Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>

Reviewed-by: Tero Kristo <t-kristo@...com>

> ---
>   drivers/edac/ti_edac.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/edac/ti_edac.c b/drivers/edac/ti_edac.c
> index 6e52796a0b41..e7eae20f83d1 100644
> --- a/drivers/edac/ti_edac.c
> +++ b/drivers/edac/ti_edac.c
> @@ -278,7 +278,8 @@ static int ti_edac_probe(struct platform_device *pdev)
>   
>   	/* add EMIF ECC error handler */
>   	error_irq = platform_get_irq(pdev, 0);
> -	if (!error_irq) {
> +	if (error_irq < 0) {
> +		ret = error_irq;
>   		edac_printk(KERN_ERR, EDAC_MOD_NAME,
>   			    "EMIF irq number not defined.\n");
>   		goto err;
> 

--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ