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:   Fri, 9 Sep 2016 11:46:05 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Arnd Bergmann <arnd@...db.de>
Cc:     David Lechner <david@...hnology.com>,
        Peter Ujfalusi <peter.ujfalusi@...com>,
        Jaehoon Chung <jh80.chung@...sung.com>,
        linux-mmc <linux-mmc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mmc: davinci: remove incorrect NO_IRQ use

On 6 September 2016 at 14:56, Arnd Bergmann <arnd@...db.de> wrote:
> platform_get_irq() returns an error value on failure, not NO_IRQ,
> so the error handling here could never work.
>
> This changes the code to propagate the error value instead.
>
> Signed-off-by: Arnd Bergmann <arnd@...db.de>

Thanks, applied for next!

Kind regards
Uffe

> ---
>  drivers/mmc/host/davinci_mmc.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
> index c521559412fc..67ef4810b3de 100644
> --- a/drivers/mmc/host/davinci_mmc.c
> +++ b/drivers/mmc/host/davinci_mmc.c
> @@ -1216,9 +1216,11 @@ static int __init davinci_mmcsd_probe(struct platform_device *pdev)
>         }
>
>         r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       irq = platform_get_irq(pdev, 0);
> -       if (!r || irq == NO_IRQ)
> +       if (!r)
>                 return -ENODEV;
> +       irq = platform_get_irq(pdev, 0);
> +       if (irq < 0)
> +               return irq;
>
>         mem_size = resource_size(r);
>         mem = devm_request_mem_region(&pdev->dev, r->start, mem_size,
> --
> 2.9.0
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ