Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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>

authored by

Jianuo Kuang and committed by
Jakub Kicinski
e515c330 86c2b51f

-5
-5
drivers/nfc/nfcsim.c
··· 367 367 } 368 368 369 369 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 - } 375 370 376 371 debugfs_create_u8("dropframe", 0664, dev_dir, &dev->dropframe); 377 372 }