提交 59929d3a 编写于 作者: W Wei Yongjun 提交者: 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: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
上级 f74c2bb9
......@@ -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,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册