Skip to content

Commit e515c33

Browse files
gitvegkuba-moo
authored andcommitted
drivers: nfc: nfcsim: remove return value check of dev_dir
Smatch complains that: nfcsim_debugfs_init_dev() warn: 'dev_dir' is an error pointer or valid According to the documentation of the debugfs_create_dir() function, there is no need to check the return value of this function. Just delete the dead code. Signed-off-by: Jianuo Kuang <[email protected]> Reviewed-by: Dongliang Mu <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 86c2b51 commit e515c33

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/nfc/nfcsim.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,11 +367,6 @@ static void nfcsim_debugfs_init_dev(struct nfcsim *dev)
367367
}
368368

369369
dev_dir = debugfs_create_dir(devname, nfcsim_debugfs_root);
370-
if (!dev_dir) {
371-
NFCSIM_ERR(dev, "Could not create debugfs entries for nfc%d\n",
372-
idx);
373-
return;
374-
}
375370

376371
debugfs_create_u8("dropframe", 0664, dev_dir, &dev->dropframe);
377372
}

0 commit comments

Comments
 (0)