[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <732485c6-b4ec-44cc-8627-c00ce2143b89@lunn.ch>
Date: Thu, 10 Apr 2025 14:05:11 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Jeff Layton <jlayton@...nel.org>
Cc: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Simon Horman <horms@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] ref_tracker: add a top level debugfs directory
for ref_tracker
> +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
Powered by blists - more mailing lists