Skip to content

Commit

Permalink
Staging: batman-adv: Ignore debugfs on kernels without debugfs support
Browse files Browse the repository at this point in the history
All code for debugfs is ignored when the creation of the batman-adv root
directory in debugfs fails. It must also be ignored when the
debugfs_create_dir tells us that debugfs is not implemented to prevent
possible crashes in the future.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Sven Eckelmann authored and Greg Kroah-Hartman committed Jun 22, 2010
1 parent 42fa1b9 commit 8bfe363
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/batman-adv/bat_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ static struct bat_debuginfo *mesh_debuginfos[] = {
void debugfs_init(void)
{
bat_debugfs = debugfs_create_dir(DEBUGFS_BAT_SUBDIR, NULL);
if (bat_debugfs == ERR_PTR(-ENODEV))
bat_debugfs = NULL;
}

void debugfs_destroy(void)
Expand Down

0 comments on commit 8bfe363

Please sign in to comment.