From: Markus Elfring <Markus.Elfring@web.de>
To: "Thierry Reding" <thierry.reding@gmail.com>,
"Minjie Du" <duminjie@vivo.com>,
linux-tegra@vger.kernel.org, kernel-janitors@vger.kernel.org,
iommu@lists.linux.dev, "Jörg Rödel" <joro@8bytes.org>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Krishna Reddy" <vdumpa@nvidia.com>,
"Robin Murphy" <robin.murphy@arm.com>,
"Will Deacon" <will@kernel.org>
Cc: opensource.kernel@vivo.com, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iommu: fix parameter check in tegra_smmu_debugfs_init()
Date: Wed, 12 Jul 2023 18:02:34 +0200 [thread overview]
Message-ID: <8aefe246-cdfe-dd39-924f-50d528ccfc9c@web.de> (raw)
In-Reply-To: <ZK6a-f2Se3HWjU7D@orome>
…
> > +++ b/drivers/iommu/tegra-smmu.c
> > @@ -1056,7 +1056,7 @@ DEFINE_SHOW_ATTRIBUTE(tegra_smmu_clients);
> > static void tegra_smmu_debugfs_init(struct tegra_smmu *smmu)
> > {
> > smmu->debugfs = debugfs_create_dir("smmu", NULL);
> > - if (!smmu->debugfs)
> > + if (IS_ERR(smmu->debugfs))
> > return;
>
> I think we can just drop the error check altogether since
> debugfs_create_file() will simply return early if smmu->debugfs is an
> error pointer.
I find this explanation confusing.
Can consistent error detection matter also at this source code place?
Regards,
Markus
prev parent reply other threads:[~2023-07-12 16:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 11:31 [PATCH v1] iommu: fix parameter check in tegra_smmu_debugfs_init() Minjie Du
2023-07-12 12:22 ` Thierry Reding
2023-07-12 12:37 ` 回复: " 杜敏杰
2023-07-12 15:06 ` Thierry Reding
2023-07-12 16:02 ` Markus Elfring [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=8aefe246-cdfe-dd39-924f-50d528ccfc9c@web.de \
--to=markus.elfring@web.de \
--cc=duminjie@vivo.com \
--cc=iommu@lists.linux.dev \
--cc=jonathanh@nvidia.com \
--cc=joro@8bytes.org \
--cc=kernel-janitors@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.