Re: [PATCH v2 1/2] ref_tracker: add a top level debugfs directory for ref_tracker

Andrew Lunn
2025-04-10T12:05:22Z

> +static int __init ref_tracker_debug_init(void)
> +{
> + ref_tracker_debug_dir = debugfs_create_dir("ref_tracker", NULL);
> + if (IS_ERR(ref_tracker_debug_dir))
> + return PTR_ERR(ref_tracker_debug_dir);
> + return 0;

With debugfs you are not supposed to check the return codes. It is
debug, it does not matter if it fails, same way it does not matter if
it is not even part of the kernel. If it does fail, operations which
add to the directory as safe, they will not opps because of a previous
failure.

Andrew