Skip to content

Commit 42877c3

Browse files
osmtensre
authored andcommitted
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>
1 parent 32a31bd commit 42877c3

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

drivers/hsi/controllers/omap_ssi_port.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -151,23 +151,17 @@ static int ssi_div_set(void *data, u64 val)
151151

152152
DEFINE_DEBUGFS_ATTRIBUTE(ssi_sst_div_fops, ssi_div_get, ssi_div_set, "%llu\n");
153153

154-
static int ssi_debug_add_port(struct omap_ssi_port *omap_port,
154+
static void ssi_debug_add_port(struct omap_ssi_port *omap_port,
155155
struct dentry *dir)
156156
{
157157
struct hsi_port *port = to_hsi_port(omap_port->dev);
158158

159159
dir = debugfs_create_dir(dev_name(omap_port->dev), dir);
160-
if (!dir)
161-
return -ENOMEM;
162160
omap_port->dir = dir;
163161
debugfs_create_file("regs", S_IRUGO, dir, port, &ssi_port_regs_fops);
164162
dir = debugfs_create_dir("sst", dir);
165-
if (!dir)
166-
return -ENOMEM;
167163
debugfs_create_file_unsafe("divisor", 0644, dir, port,
168164
&ssi_sst_div_fops);
169-
170-
return 0;
171165
}
172166
#endif
173167

@@ -1217,11 +1211,7 @@ static int ssi_port_probe(struct platform_device *pd)
12171211
pm_runtime_enable(omap_port->pdev);
12181212

12191213
#ifdef CONFIG_DEBUG_FS
1220-
err = ssi_debug_add_port(omap_port, omap_ssi->dir);
1221-
if (err < 0) {
1222-
pm_runtime_disable(omap_port->pdev);
1223-
goto error;
1224-
}
1214+
ssi_debug_add_port(omap_port, omap_ssi->dir);
12251215
#endif
12261216

12271217
hsi_add_clients_from_dt(port, np);

0 commit comments

Comments
 (0)