iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
Subsystems (3)
PATCH v3 1/1 iommu: remove redundant parameter check in tegra_smmu_debugfs_init()
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 <[email protected]>
Acked-by Thierry Reding <[email protected]>
--- drivers/iommu/tegra-smmu.c | 2 -- 1 file changed, 2 deletions(-)
drivers/iommu/tegra-smmu.c +0 -2
@@ -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);
Signature · 1 line
2.39.0
Quoted 2 lines · Minjie Du
debugfs_create_file()will return early ifsmmu->debugfsis 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