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: <CAPDyKFohj2FBSP8v3WM4YUwfk4FMCeRVRucEsaqjDQ6bq0obwg@mail.gmail.com>
Date:   Mon, 27 Nov 2017 10:31:59 +0100
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Arvind Yadav <arvind.yadav.cs@...il.com>
Cc:     Wolfram Sang <wsa+renesas@...g-engineering.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-mmc@...r.kernel.org" <linux-mmc@...r.kernel.org>
Subject: Re: [PATCH] mmc: usdhi6rol0: Handle return value of
 platform_get_irq_byname for card detect

On 17 November 2017 at 17:35, Arvind Yadav <arvind.yadav.cs@...il.com> wrote:
> platform_get_irq_byname() can fail here and we must check its return value.

NAK.

You need to check the code more carefully. irq_cd is dealt with later
below in the same function with proper error handling.

>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@...il.com>
> ---
>  drivers/mmc/host/usdhi6rol0.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/usdhi6rol0.c b/drivers/mmc/host/usdhi6rol0.c
> index cdfeb15..5a896de 100644
> --- a/drivers/mmc/host/usdhi6rol0.c
> +++ b/drivers/mmc/host/usdhi6rol0.c
> @@ -1749,7 +1749,7 @@ static int usdhi6_probe(struct platform_device *pdev)
>         irq_cd = platform_get_irq_byname(pdev, "card detect");
>         irq_sd = platform_get_irq_byname(pdev, "data");
>         irq_sdio = platform_get_irq_byname(pdev, "SDIO");
> -       if (irq_sd < 0 || irq_sdio < 0)
> +       if (irq_cd < 0 || irq_sd < 0 || irq_sdio < 0)
>                 return -ENODEV;
>
>         mmc = mmc_alloc_host(sizeof(struct usdhi6_host), dev);
> --
> 2.7.4
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ