Commit 59929d3a authored by Wei Yongjun's avatar Wei Yongjun Committed by Bartosz Golaszewski

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: 2a9e2740 ("gpio: mockup: rework debugfs interface")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: default avatarBartosz Golaszewski <bgolaszewski@baylibre.com>
parent f74c2bb9
...@@ -309,6 +309,7 @@ static const struct file_operations gpio_mockup_debugfs_ops = { ...@@ -309,6 +309,7 @@ static const struct file_operations gpio_mockup_debugfs_ops = {
.read = gpio_mockup_debugfs_read, .read = gpio_mockup_debugfs_read,
.write = gpio_mockup_debugfs_write, .write = gpio_mockup_debugfs_write,
.llseek = no_llseek, .llseek = no_llseek,
.release = single_release,
}; };
static void gpio_mockup_debugfs_setup(struct device *dev, static void gpio_mockup_debugfs_setup(struct device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment