summaryrefslogtreecommitdiffstats
path: root/drivers/hsi
diff options
context:
space:
mode:
authorYang Ruibin <11162571@vivo.com>2024-08-27 14:08:16 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-08-27 15:28:56 +0200
commitc3eddf5e8c30adb6f43fc0b149e88b9feb76f381 (patch)
treed189185147dabecc74792f470a0401015f8b897a /drivers/hsi
parentLinux 6.11-rc1 (diff)
downloadlinux-c3eddf5e8c30adb6f43fc0b149e88b9feb76f381.tar.xz
linux-c3eddf5e8c30adb6f43fc0b149e88b9feb76f381.zip
HSI: omap-ssi: Remove unnecessary debugfs_create_dir() error check
Remove the debugfs_create_dir() error check. It's safe to pass in error pointers to the debugfs API, hence the user isn't supposed to include error checking of the return values. Signed-off-by: Yang Ruibin <11162571@vivo.com> Link: https://lore.kernel.org/r/20240827120816.3910198-1-11162571@vivo.com Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/hsi')
-rw-r--r--drivers/hsi/controllers/omap_ssi_core.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/hsi/controllers/omap_ssi_core.c b/drivers/hsi/controllers/omap_ssi_core.c
index 3140990a6164..15cb759151e6 100644
--- a/drivers/hsi/controllers/omap_ssi_core.c
+++ b/drivers/hsi/controllers/omap_ssi_core.c
@@ -116,22 +116,13 @@ static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
/* SSI controller */
omap_ssi->dir = debugfs_create_dir(dev_name(&ssi->device), NULL);
- if (!omap_ssi->dir)
- return -ENOMEM;
+ debugfs_create_file("regs", S_IRUGO, omap_ssi->dir, ssi, &ssi_regs_fops);
- debugfs_create_file("regs", S_IRUGO, omap_ssi->dir, ssi,
- &ssi_regs_fops);
/* SSI GDD (DMA) */
dir = debugfs_create_dir("gdd", omap_ssi->dir);
- if (!dir)
- goto rback;
debugfs_create_file("regs", S_IRUGO, dir, ssi, &ssi_gdd_regs_fops);
return 0;
-rback:
- debugfs_remove_recursive(omap_ssi->dir);
-
- return -ENOMEM;
}
static void ssi_debug_remove_ctrl(struct hsi_controller *ssi)