[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZIy5ecuHQUP1wUu2@duo.ucw.cz>
Date: Fri, 16 Jun 2023 21:35:21 +0200
From: Pavel Machek <pavel@...x.de>
To: Sasha Levin <sashal@...nel.org>
Cc: linux-kernel@...r.kernel.org, stable@...r.kernel.org,
Osama Muhammad <osmtendev@...il.com>,
Simon Horman <simon.horman@...igine.com>,
"David S . Miller" <davem@...emloft.net>,
krzysztof.kozlowski@...aro.org, netdev@...r.kernel.org
Subject: Re: [PATCH AUTOSEL 4.14 4/6] nfcsim.c: Fix error checking for
debugfs_create_dir
Hi!
> [ Upstream commit 9b9e46aa07273ceb96866b2e812b46f1ee0b8d2f ]
>
> This patch fixes the error checking in nfcsim.c.
> The DebugFS kernel API is developed in
> a way that the caller can safely ignore the errors that
> occur during the creation of DebugFS nodes.
I don't think this is good idea; user will wonder why he can't see
debugfs files, and pr_err() is quite suitable way to handle this.
Anyway, this does not really fix a bug, so we should not be putting it
into stable.
Best regards,
Pavel
> drivers/nfc/nfcsim.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/nfc/nfcsim.c b/drivers/nfc/nfcsim.c
> index 533e3aa6275cd..cf07b366500e9 100644
> --- a/drivers/nfc/nfcsim.c
> +++ b/drivers/nfc/nfcsim.c
> @@ -345,10 +345,6 @@ static struct dentry *nfcsim_debugfs_root;
> static void nfcsim_debugfs_init(void)
> {
> nfcsim_debugfs_root = debugfs_create_dir("nfcsim", NULL);
> -
> - if (!nfcsim_debugfs_root)
> - pr_err("Could not create debugfs entry\n");
> -
> }
>
> static void nfcsim_debugfs_remove(void)
--
DENX Software Engineering GmbH, Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists