]> git.baikalelectronics.ru Git - kernel.git/commitdiff
gpio: mockup: add missing single_release()
authorWei Yongjun <weiyongjun1@huawei.com>
Wed, 4 Sep 2019 14:18:34 +0000 (14:18 +0000)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 9 Sep 2019 07:55:27 +0000 (09:55 +0200)
When using single_open() for opening, single_release() should be
used instead of seq_release(), otherwise there is a memory leak.

Fixes: 78bb0654288a ("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>
drivers/gpio/gpio-mockup.c

index f1a9c0544e3f7f5fc63c8f87298c5630c3254e4b..213aedc97dc2e7d37c04194b889d95acb7763df5 100644 (file)
@@ -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,