提交 b7479990 编写于 作者: M Mathias Krause 提交者: Sumit Semwal

dma-buf: remove dma_buf directory on bufinfo file creation errors

Change the error handling in dma_buf_init_debugfs() to remove the
"dma_buf" directory if creating the "bufinfo" file fails. No need to
have an empty debugfs directory around.
Signed-off-by: NMathias Krause <minipli@googlemail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NSumit Semwal <sumit.semwal@linaro.org>
上级 eb0b947e
......@@ -907,8 +907,11 @@ static int dma_buf_init_debugfs(void)
err = dma_buf_debugfs_create_file("bufinfo", NULL);
if (err)
if (err) {
pr_debug("dma_buf: debugfs: failed to create node bufinfo\n");
debugfs_remove_recursive(dma_buf_debugfs_dir);
dma_buf_debugfs_dir = NULL;
}
return err;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册