Skip to content

Commit 5a6b5d5

Browse files
Dan Carpenterthierryreding
authored andcommitted
memory: tegra: Delete some dead code
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 <[email protected]> Signed-off-by: Thierry Reding <[email protected]>
1 parent 2de7589 commit 5a6b5d5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/memory/tegra/tegra186-emc.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,11 +243,6 @@ static int tegra186_emc_probe(struct platform_device *pdev)
243243
}
244244

245245
emc->debugfs.root = debugfs_create_dir("emc", NULL);
246-
if (!emc->debugfs.root) {
247-
dev_err(&pdev->dev, "failed to create debugfs directory\n");
248-
return 0;
249-
}
250-
251246
debugfs_create_file("available_rates", S_IRUGO, emc->debugfs.root,
252247
emc, &tegra186_emc_debug_available_rates_fops);
253248
debugfs_create_file("min_rate", S_IRUGO | S_IWUSR, emc->debugfs.root,

0 commit comments

Comments
 (0)