summaryrefslogtreecommitdiff
path: root/drivers/memory/tegra/tegra20-emc.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2021-06-09 12:55:25 +0300
committerKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>2021-06-10 10:18:15 +0300
commitc7c65703260c88a3e4d7387b2d03023c3625c6d4 (patch)
tree022a0bd6eeb979baebc158ef8ad08842274e8a54 /drivers/memory/tegra/tegra20-emc.c
parent393d66fd2cacba3e6aa95d7bb38790bfb7b1cc3a (diff)
downloadlinux-c7c65703260c88a3e4d7387b2d03023c3625c6d4.tar.xz
memory: tegra: Delete dead debugfs checking code
The debugfs_create_dir() function does not return NULL, it returns error pointers. But in normal situations like this where the caller is not dereferencing "emc->debugfs.root" then we are not supposed to check the return. So instead of fixing these checks, we should delete them. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YMCQDTSyG8UuQoh0@mwanda Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Diffstat (limited to 'drivers/memory/tegra/tegra20-emc.c')
-rw-r--r--drivers/memory/tegra/tegra20-emc.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/memory/tegra/tegra20-emc.c b/drivers/memory/tegra/tegra20-emc.c
index a534197a5fb2..c3462dbc8c22 100644
--- a/drivers/memory/tegra/tegra20-emc.c
+++ b/drivers/memory/tegra/tegra20-emc.c
@@ -776,10 +776,6 @@ static void tegra_emc_debugfs_init(struct tegra_emc *emc)
}
emc->debugfs.root = debugfs_create_dir("emc", NULL);
- if (!emc->debugfs.root) {
- dev_err(emc->dev, "failed to create debugfs directory\n");
- return;
- }
debugfs_create_file("available_rates", 0444, emc->debugfs.root,
emc, &tegra_emc_debug_available_rates_fops);