mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
Fix debugfs_create_bool's error checking method for wireless/iwlwifi/
debugfs_create_bool() returns NULL if an error occurs, returns -ENODEV when debugfs is not enabled in the kernel. Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
ac9440a4e4
commit
9b24001db1
1 changed files with 2 additions and 1 deletions
|
@ -58,7 +58,8 @@
|
|||
#define DEBUGFS_ADD_BOOL(name, parent, ptr) do { \
|
||||
dbgfs->dbgfs_##parent##_files.file_##name = \
|
||||
debugfs_create_bool(#name, 0644, dbgfs->dir_##parent, ptr); \
|
||||
if (IS_ERR(dbgfs->dbgfs_##parent##_files.file_##name)) \
|
||||
if (IS_ERR(dbgfs->dbgfs_##parent##_files.file_##name) \
|
||||
|| !dbgfs->dbgfs_##parent##_files.file_##name) \
|
||||
goto err; \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Reference in a new issue