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: <CAPDyKFqHnHCpsi+GBAQ2vmESf17rDMGyUK+EtZbhJT5AngvmBg@mail.gmail.com>
Date:   Wed, 9 Aug 2023 13:33:51 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>
Cc:     tonyhuang.sunplus@...il.com, lhjeff911@...il.com,
        dan.carpenter@...aro.org, arnd@...db.de, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org, error27@...il.com,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH next v2 2/2] mmc: sunplus: Fix platform_get_irq() error checking

On Wed, 9 Aug 2023 at 09:19, Harshit Mogalapalli
<harshit.m.mogalapalli@...cle.com> wrote:
>
> The platform_get_irq() function returns negative error codes on failure.
>
> Fixes: 4e268fed8b18 ("mmc: Add mmc driver for Sunplus SP7021")
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lore.kernel.org/all/a3829ed3-d827-4b9d-827e-9cc24a3ec3bc@moroto.mountain/
> Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@...cle.com>

Applied for fixes and by adding a stable tag, thanks!

Kind regards
Uffe


> ---
> v1->v2: Split into two patches as they are doing different things.
>
> This is based on static analysis with smatch, only compile tested.
> ---
>  drivers/mmc/host/sunplus-mmc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sunplus-mmc.c b/drivers/mmc/host/sunplus-mmc.c
> index 2bdebeb1f8e4..e9cb1a57cb75 100644
> --- a/drivers/mmc/host/sunplus-mmc.c
> +++ b/drivers/mmc/host/sunplus-mmc.c
> @@ -885,7 +885,7 @@ static int spmmc_drv_probe(struct platform_device *pdev)
>                 return dev_err_probe(&pdev->dev, PTR_ERR(host->rstc), "rst get fail\n");
>
>         host->irq = platform_get_irq(pdev, 0);
> -       if (host->irq <= 0)
> +       if (host->irq < 0)
>                 return host->irq;
>
>         ret = devm_request_threaded_irq(&pdev->dev, host->irq,
> --
> 2.39.3
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ