From: Baolu Lu <baolu.lu@linux.intel.com>
To: Minjie Du <duminjie@vivo.com>,
Thierry Reding <thierry.reding@gmail.com>,
Krishna Reddy <vdumpa@nvidia.com>, Joerg Roedel <joro@8bytes.org>,
Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Jonathan Hunter <jonathanh@nvidia.com>,
"open list:TEGRA IOMMU DRIVERS" <linux-tegra@vger.kernel.org>,
"open list:IOMMU SUBSYSTEM" <iommu@lists.linux.dev>,
open list <linux-kernel@vger.kernel.org>
Cc: baolu.lu@linux.intel.com, opensource.kernel@vivo.com
Subject: Re: [PATCH v5] iommu: Fix an error check in tegra_smmu_debugfs_init()
Date: Sat, 15 Jul 2023 14:26:10 +0800 [thread overview]
Message-ID: <db554c27-f663-0146-5e5f-b319547757c3@linux.intel.com> (raw)
In-Reply-To: <20230714081320.1998-1-duminjie@vivo.com>
On 7/14/23 4:13 PM, Minjie Du wrote:
> debugfs_create_dir() function returns an error value(PTR_ERR).
> We need to evaluate the return value using IS_ERR,
> rather than checking for NULL.
>
> Fixes: d1313e7896e9 ("iommu/tegra-smmu: Add debugfs support")
> Signed-off-by: Minjie Du<duminjie@vivo.com>
> ---
> V4 -> V5: debugfs needs to have error checking, so use IS_ERR() to error check.
Why?
[...]
* NOTE: it's expected that most callers should _ignore_ the errors
returned
* by this function. Other debugfs functions handle the fact that the
"dentry"
* passed to them could be an error and they don't crash in that case.
* Drivers should generally work fine even if debugfs fails to init anyway.
*/
struct dentry *debugfs_create_dir(const char *name, struct dentry *parent)
{
struct dentry *dentry = start_creating(name, parent);
struct inode *inode;
if (IS_ERR(dentry))
return dentry;
[...]
Best regards,
baolu
prev parent reply other threads:[~2023-07-15 6:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-14 8:13 Minjie Du
2023-07-15 6:26 ` Baolu Lu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=db554c27-f663-0146-5e5f-b319547757c3@linux.intel.com \
--to=baolu.lu@linux.intel.com \
--cc=duminjie@vivo.com \
--cc=iommu@lists.linux.dev \
--cc=jonathanh@nvidia.com \
--cc=joro@8bytes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=opensource.kernel@vivo.com \
--cc=robin.murphy@arm.com \
--cc=thierry.reding@gmail.com \
--cc=vdumpa@nvidia.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®