summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-mockup.c
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2019-09-04 16:18:34 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2019-09-09 09:55:27 +0200
commit59929d3a2eb6c4abafc5b61a20c98aa8728ec378 (patch)
tree482d6d76e7a0e006fc734db4e006b82f3f2e5eec /drivers/gpio/gpio-mockup.c
parentLinux 5.3-rc8 (diff)
downloadlinux-59929d3a2eb6c4abafc5b61a20c98aa8728ec378.tar.xz
linux-59929d3a2eb6c4abafc5b61a20c98aa8728ec378.zip
gpio: mockup: add missing single_release()
When using single_open() for opening, single_release() should be used instead of seq_release(), otherwise there is a memory leak. Fixes: 2a9e27408e12 ("gpio: mockup: rework debugfs interface") Cc: stable <stable@vger.kernel.org> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/gpio/gpio-mockup.c')
-rw-r--r--drivers/gpio/gpio-mockup.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpio/gpio-mockup.c b/drivers/gpio/gpio-mockup.c
index f1a9c0544e3f..213aedc97dc2 100644
--- a/drivers/gpio/gpio-mockup.c
+++ b/drivers/gpio/gpio-mockup.c
@@ -309,6 +309,7 @@ static const struct file_operations gpio_mockup_debugfs_ops = {
.read = gpio_mockup_debugfs_read,
.write = gpio_mockup_debugfs_write,
.llseek = no_llseek,
+ .release = single_release,
};
static void gpio_mockup_debugfs_setup(struct device *dev,