[PATCH] gpio: sloppy-logic-analyzer: add a comment explaining the buffer init

Wolfram Sang <[email protected]>
Newsgroups org.kernel.vger.linux-renesas-soc,org.kernel.vger.linux-gpio
Message-ID <[email protected]>
To avoid more false positive reports of "leaking memory" when
fops_buf_size_set() returns an error.

Signed-off-by: Wolfram Sang <[email protected]>
---
 drivers/gpio/gpio-sloppy-logic-analyzer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-sloppy-logic-analyzer.c b/drivers/gpio/gpio-sloppy-logic-analyzer.c
index 2bbd308ca08e..6748ddce3c19 100644
--- 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);
-- 
2.47.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.