* [PATCH] memory: tegra: Delete some dead code
@ 2020-05-08 11:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2020-05-08 11:42 UTC (permalink / raw)
To: Thierry Reding
Cc: Jonathan Hunter, Christophe JAILLET,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
The debugfs_create_dir() function never returns NULL and anyway the
correct behavior is to ignore errors in this situation. The
debugfs_create_file() will become a no-op if "emc->debugfs.root" is an
error pointer.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/memory/tegra/tegra186-emc.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
index 97f26bc77ad41..7c904e9bba8e8 100644
--- a/drivers/memory/tegra/tegra186-emc.c
+++ b/drivers/memory/tegra/tegra186-emc.c
@@ -241,11 +241,6 @@ static int tegra186_emc_probe(struct platform_device *pdev)
}
emc->debugfs.root = debugfs_create_dir("emc", NULL);
- if (!emc->debugfs.root) {
- dev_err(&pdev->dev, "failed to create debugfs directory\n");
- return 0;
- }
-
debugfs_create_file("available_rates", S_IRUGO, emc->debugfs.root,
emc, &tegra186_emc_debug_available_rates_fops);
debugfs_create_file("min_rate", S_IRUGO | S_IWUSR, emc->debugfs.root,
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] memory: tegra: Delete some dead code
@ 2020-05-08 11:42 ` Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2020-05-08 11:42 UTC (permalink / raw)
To: Thierry Reding
Cc: Jonathan Hunter, Christophe JAILLET,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
kernel-janitors-u79uwXL29TY76Z2rM5mHXA
The debugfs_create_dir() function never returns NULL and anyway the
correct behavior is to ignore errors in this situation. The
debugfs_create_file() will become a no-op if "emc->debugfs.root" is an
error pointer.
Signed-off-by: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
drivers/memory/tegra/tegra186-emc.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/memory/tegra/tegra186-emc.c b/drivers/memory/tegra/tegra186-emc.c
index 97f26bc77ad41..7c904e9bba8e8 100644
--- a/drivers/memory/tegra/tegra186-emc.c
+++ b/drivers/memory/tegra/tegra186-emc.c
@@ -241,11 +241,6 @@ static int tegra186_emc_probe(struct platform_device *pdev)
}
emc->debugfs.root = debugfs_create_dir("emc", NULL);
- if (!emc->debugfs.root) {
- dev_err(&pdev->dev, "failed to create debugfs directory\n");
- return 0;
- }
-
debugfs_create_file("available_rates", S_IRUGO, emc->debugfs.root,
emc, &tegra186_emc_debug_available_rates_fops);
debugfs_create_file("min_rate", S_IRUGO | S_IWUSR, emc->debugfs.root,
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-05-08 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-05-08 11:42 [PATCH] memory: tegra: Delete some dead code Dan Carpenter
2020-05-08 11:42 ` Dan Carpenter
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.