hsi: controllers: Remove error checking for debugfs_create_dir()
PATCH v2 1/1 hsi: controllers: Remove error checking for debugfs_create_dir()
It is expected that most callers should _ignore_ the errors return by debugfs_create_dir() in bond_debug_reregister().
--- drivers/hsi/controllers/omap_ssi_core.c | 2 -- 1 file changed, 2 deletions(-)
drivers/hsi/controllers/omap_ssi_core.c +0 -2
@@ -115,8 +115,6 @@ 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);
Signature · 1 line
2.25.1
Sebastian Reichel
maintainerHi,
Quoted 2 lines · Wang Ming
It is expected that most callers should _ignore_ the errors return by
debugfs_create_dir()inbond_debug_reregister().
bond_debug_reregister()?
drivers/hsi/controllers/omap_ssi_core.c static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
Quoted 10 lines
Signed-off-by Wang Ming <[email protected]>--- drivers/hsi/controllers/omap_ssi_core.c | 2 -- 1 file changed, 2 deletions(-)drivers/hsi/controllers/omap_ssi_core.c +0
-0@@ -115,8 +115,6 @@ static int ssi_debug_add_ctrl(struct hsi_controller *ssi)
function can become void, if errors are ignored.
drivers/hsi/controllers/omap_ssi_core.c static int ssi_debug_add_ctrl(struct hsi_controller *ssi) · line 119
Quoted 5 lines
drivers/hsi/controllers/omap_ssi_core.c +0
-2/* SSI controller */ omap_ssi->dir =debugfs_create_dir (dev_name (&ssi->device),NULL ); -if (!omap_ssi->dir) -return -ENOMEM ;
What about the second debugfs_create_dir() call in the same function?
drivers/hsi/controllers/omap_ssi_core.c static int ssi_debug_add_ctrl(struct hsi_controller *ssi) · line 120
Quoted 3 lines
drivers/hsi/controllers/omap_ssi_core.c +0
-0debugfs_create_file ("regs" ,S_IRUGO , omap_ssi->dir, ssi, &ssi_regs_fops);
-- Sebastian