mbox series

[wireless-next,v2,0/3] wifi: Drop unnecessary error checks for debugfs_create_dir()

Message ID 20230903030216.1509013-1-ruanjinjie@huawei.com (mailing list archive)
Headers show
Series wifi: Drop unnecessary error checks for debugfs_create_dir() | expand

Message

Jinjie Ruan Sept. 3, 2023, 3:02 a.m. UTC
debugfs_create_dir() returns ERR_PTR and never returns NULL.

As Russell suggested, this patch set removes the error checking for
debugfs_create_dir(). This is because 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. The debugfs APIs have a IS_ERR() judge in
start_creating() which can handle it gracefully. So these checks are
unnecessary.

Changes in v2:
- Update the subject prefix from net to wireless-next as suggested.
- Remove the err check instead of using IS_ERR to replace NULL check.
- Update the commit message and title.

Jinjie Ruan (3):
  wifi: iwlwifi: mei: Drop unnecessary error check for
    debugfs_create_dir()
  mwifiex: debugfs: Drop unnecessary error check for
    debugfs_create_dir()
  wifi: mt76: Drop unnecessary error check for debugfs_create_dir()

 drivers/net/wireless/intel/iwlwifi/mei/main.c  | 3 ---
 drivers/net/wireless/marvell/mwifiex/debugfs.c | 3 ---
 drivers/net/wireless/mediatek/mt76/debugfs.c   | 2 --
 3 files changed, 8 deletions(-)