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: <CAMuHMdU+_NuLp2FuwwcLfJRe2ssMtp=z7fqcsANgYfFehTNJGg@mail.gmail.com>
Date: Mon, 9 Dec 2024 14:51:51 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Claudiu <claudiu.beznea@...on.dev>
Cc: mturquette@...libre.com, sboyd@...nel.org, robh@...nel.org, 
	krzk+dt@...nel.org, conor+dt@...nel.org, biju.das.jz@...renesas.com, 
	prabhakar.mahadev-lad.rj@...renesas.com, lgirdwood@...il.com, 
	broonie@...nel.org, magnus.damm@...il.com, linus.walleij@...aro.org, 
	perex@...ex.cz, tiwai@...e.com, p.zabel@...gutronix.de, 
	linux-renesas-soc@...r.kernel.org, linux-clk@...r.kernel.org, 
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org, 
	linux-sound@...r.kernel.org, linux-gpio@...r.kernel.org, 
	Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
Subject: Re: [PATCH v3 14/25] ASoC: renesas: rz-ssi: Use goto label names that
 specify their actions

Hi Claudiu,

On Wed, Nov 13, 2024 at 2:36 PM Claudiu <claudiu.beznea@...on.dev> wrote:
> From: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>
>
> Use goto label names that specify their action. In this way we can have
> a better understanding of what is the action associated with the label
> by just reading the label name.
>
> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@...renesas.com>

Thanks for your patch!

Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>

> --- a/sound/soc/renesas/rz-ssi.c
> +++ b/sound/soc/renesas/rz-ssi.c
> @@ -1084,15 +1084,15 @@ static int rz_ssi_probe(struct platform_device *pdev)
>         /* Error Interrupt */
>         ssi->irq_int = platform_get_irq_byname(pdev, "int_req");
>         if (ssi->irq_int < 0) {
> -               rz_ssi_release_dma_channels(ssi);
> -               return ssi->irq_int;
> +               ret = ssi->irq_int;
> +               goto err_release_dma_chs;
>         }
>
>         ret = devm_request_irq(dev, ssi->irq_int, &rz_ssi_interrupt,
>                                0, dev_name(dev), ssi);
>         if (ret < 0) {
> -               rz_ssi_release_dma_channels(ssi);
> -               return dev_err_probe(dev, ret, "irq request error (int_req)\n");
> +               dev_err_probe(dev, ret, "irq request error (int_req)\n");
> +               goto err_release_dma_chs;
>         }
>
>         if (!rz_ssi_is_dma_enabled(ssi)) {

Inside this block there are several return statements.
As we know DMA is not available when we get here, these do not
need to call rz_ssi_release_dma_channels() hence do not use
"goto err_release_dma_chs".
However, this may be missed when making future changes.
So perhaps it may be prudent to make this safer, by moving this inside
the failure branch of the rz_ssi_dma_request() check above?

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ