Re: [PATCH] gpio: sloppy-logic-analyzer: add a comment explaining the buffer init
Geert Uytterhoeven <[email protected]>
| Newsgroups | org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-gpio |
|---|---|
| Message-ID | <CAMuHMdV415V23a9E2QM77iQdGePOoZYNk=+v0Hms6uxugKBu5g@mail.gmail.com> |
Hi Wolfram, Thanks for your patch! On Sun, 12 Jul 2026 at 11:32, Wolfram Sang <[email protected]> wrote: > To avoid more false positive reports of "leaking memory" when > fops_buf_size_set() returns an error. But who is freeing priv->blob.data when fops_buf_size_set() succeeds? > > Signed-off-by: Wolfram Sang <[email protected]> > --- a/drivers/gpio/gpio-sloppy-logic-analyzer.c > +++ b/drivers/gpio/gpio-sloppy-logic-analyzer.c > @@ -237,6 +237,7 @@ static int gpio_la_poll_probe(struct platform_device *pdev) > if (ret) > return ret; > > + /* Initially allocate a buffer. It currently is NULL */ > fops_buf_size_set(priv, GPIO_LA_DEFAULT_BUF_SIZE); > > priv->descs = devm_gpiod_get_array(dev, "probe", GPIOD_IN); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected] 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