diff mbox series

[v3] iommu: remove redundant parameter check in tegra_smmu_debugfs_init()

Message ID 20230713071902.9007-1-duminjie@vivo.com
State Changes Requested
Headers show
Series [v3] iommu: remove redundant parameter check in tegra_smmu_debugfs_init() | expand

Commit Message

Minjie Du July 13, 2023, 7:19 a.m. UTC
debugfs_create_file() will return early if smmu->debugfs is an error
  pointer, so an extra error check is not needed.

Signed-off-by: Minjie Du <duminjie@vivo.com>
Acked-by: Thierry Reding <treding@nvidia.com>
---
 drivers/iommu/tegra-smmu.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Thierry Reding July 13, 2023, 7:23 a.m. UTC | #1
On Thu, Jul 13, 2023 at 03:19:02PM +0800, Minjie Du wrote:
> debugfs_create_file() will return early if smmu->debugfs is an error
>   pointer, so an extra error check is not needed.

Not sure where the two spaces at the beginning of the line came from,
but they don't belong there.

Thierry
diff mbox series

Patch

diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c
index 1cbf063cc..2137040b7 100644
--- a/drivers/iommu/tegra-smmu.c
+++ b/drivers/iommu/tegra-smmu.c
@@ -1056,8 +1056,6 @@  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)
-		return;
 
 	debugfs_create_file("swgroups", S_IRUGO, smmu->debugfs, smmu,
 			    &tegra_smmu_swgroups_fops);