public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] iommu: fix parameter check in tegra_smmu_debugfs_init()
@ 2023-07-12 11:31 Minjie Du
  2023-07-12 12:22 ` Thierry Reding
  0 siblings, 1 reply; 3+ messages in thread
From: Minjie Du @ 2023-07-12 11:31 UTC (permalink / raw)
  To: Thierry Reding, Krishna Reddy, Joerg Roedel, Will Deacon,
	Robin Murphy, Jonathan Hunter, open list:TEGRA IOMMU DRIVERS,
	open list:IOMMU SUBSYSTEM, open list
  Cc: opensource.kernel, Minjie Du

Make IS_ERR() judge the debugfs_create_dir() function return
in tegra_smmu_debugfs_init()

Signed-off-by: Minjie Du <duminjie@vivo.com>
---
 drivers/iommu/tegra-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 1cbf063cc..841e14cce 100644
--- a/drivers/iommu/tegra-smmu.c
+++ 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;
 
 	debugfs_create_file("swgroups", S_IRUGO, smmu->debugfs, smmu,
-- 
2.39.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-07-12 15:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
     [not found]   ` <SG2PR06MB52889E70309210CD49400A64AE36A@SG2PR06MB5288.apcprd06.prod.outlook.com>
2023-07-12 15:06     ` 回复: " Thierry Reding

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox