Skip to content

Commit

Permalink
drivers: nfc: nfcsim: remove return value check of dev_dir
Browse files Browse the repository at this point in the history
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 <u202110722@hust.edu.cn>
Reviewed-by: Dongliang Mu <dzm91@hust.edu.cn>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230424024140.34607-1-u202110722@hust.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Jianuo Kuang authored and Jakub Kicinski committed Apr 25, 2023
1 parent 86c2b51 commit e515c33
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/nfc/nfcsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,11 +367,6 @@ static void nfcsim_debugfs_init_dev(struct nfcsim *dev)
}

dev_dir = debugfs_create_dir(devname, nfcsim_debugfs_root);
if (!dev_dir) {
NFCSIM_ERR(dev, "Could not create debugfs entries for nfc%d\n",
idx);
return;
}

debugfs_create_u8("dropframe", 0664, dev_dir, &dev->dropframe);
}
Expand Down

0 comments on commit e515c33

Please sign in to comment.