lkml.org 
[lkml]   [2018]   [Jul]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v6 3/8] interconnect: Add debugfs support
On Mon, Jul 09, 2018 at 06:50:59PM +0300, Georgi Djakov wrote:
> +static int __init icc_debugfs_init(void)
> +{
> + struct dentry *file;
> +
> + icc_debugfs_dir = debugfs_create_dir("interconnect", NULL);
> + if (!icc_debugfs_dir) {
> + pr_err("interconnect: error creating debugfs directory\n");
> + return -ENODEV;
> + }

You should never care about the return value of a debugfs call. Just
ignore it and move on.

> + file = debugfs_create_file("interconnect_summary", 0444,
> + icc_debugfs_dir, NULL, &icc_summary_fops);
> + if (!file)
> + return -ENODEV;

Again, do not check this.

Where do you remove this directory and file from the system when the
code shuts down?

thanks,

greg k-h
\
 
 \ /
  Last update: 2018-07-15 22:07    [W:0.145 / U:0.908 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site