diff options
author | Osama Muhammad <osmtendev@gmail.com> | 2023-05-25 17:38:37 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@kernel.org> | 2023-05-27 18:50:27 +0200 |
commit | 42877c38ac78e456fd9e149842a96a3576fb36e5 (patch) | |
tree | b3c69cb110d816a204f0a8cfd39f7e8d37e57b1f /drivers/hsi | |
parent | HSI: fix ssi_waketest() declaration (diff) | |
download | linux-42877c38ac78e456fd9e149842a96a3576fb36e5.tar.xz linux-42877c38ac78e456fd9e149842a96a3576fb36e5.zip |
HSI: omap_ssi_port: Drop error checking for debugfs_create_dir
This patch fixes the error checking in omap_ssi_port.c. The DebugFS
kernel API is developed in a way that the caller can safely ignore the
errors that occur during the creation of DebugFS nodes.
Signed-off-by: Osama Muhammad <osmtendev@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/hsi')
-rw-r--r-- | drivers/hsi/controllers/omap_ssi_port.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/hsi/controllers/omap_ssi_port.c b/drivers/hsi/controllers/omap_ssi_port.c index b9495b720f1b..c78d9c9f7371 100644 --- a/drivers/hsi/controllers/omap_ssi_port.c +++ b/drivers/hsi/controllers/omap_ssi_port.c @@ -151,23 +151,17 @@ static int ssi_div_set(void *data, u64 val) DEFINE_DEBUGFS_ATTRIBUTE(ssi_sst_div_fops, ssi_div_get, ssi_div_set, "%llu\n"); -static int ssi_debug_add_port(struct omap_ssi_port *omap_port, +static void ssi_debug_add_port(struct omap_ssi_port *omap_port, struct dentry *dir) { struct hsi_port *port = to_hsi_port(omap_port->dev); dir = debugfs_create_dir(dev_name(omap_port->dev), dir); - if (!dir) - return -ENOMEM; omap_port->dir = dir; debugfs_create_file("regs", S_IRUGO, dir, port, &ssi_port_regs_fops); dir = debugfs_create_dir("sst", dir); - if (!dir) - return -ENOMEM; debugfs_create_file_unsafe("divisor", 0644, dir, port, &ssi_sst_div_fops); - - return 0; } #endif @@ -1217,11 +1211,7 @@ static int ssi_port_probe(struct platform_device *pd) pm_runtime_enable(omap_port->pdev); #ifdef CONFIG_DEBUG_FS - err = ssi_debug_add_port(omap_port, omap_ssi->dir); - if (err < 0) { - pm_runtime_disable(omap_port->pdev); - goto error; - } + ssi_debug_add_port(omap_port, omap_ssi->dir); #endif hsi_add_clients_from_dt(port, np); |