Skip to content

Commit b11403c

Browse files
osmtennmenon
authored andcommitted
wkup_m3_ipc.c: Fix error checking for debugfs_create_dir
This patch fixes the error checking in wkup_m3_ipc.c in debugfs_create_dir. The correct way to check if an error occurred is 'IS_ERR' inline function. Signed-off-by: Osama Muhammad <osmtendev@gmail.com> Link: https://lore.kernel.org/r/20230517172431.13507-1-osmtendev@gmail.com Signed-off-by: Nishanth Menon <nm@ti.com>
1 parent 0211cc1 commit b11403c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/soc/ti/wkup_m3_ipc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ static int wkup_m3_ipc_dbg_init(struct wkup_m3_ipc *m3_ipc)
202202
{
203203
m3_ipc->dbg_path = debugfs_create_dir("wkup_m3_ipc", NULL);
204204

205-
if (!m3_ipc->dbg_path)
205+
if (IS_ERR(m3_ipc->dbg_path))
206206
return -EINVAL;
207207

208208
(void)debugfs_create_file("enable_late_halt", 0644,

0 commit comments

Comments
 (0)