Author: marek Date: 2010-06-10 09:50:33 +0200 (Thu, 10 Jun 2010) New Revision: 1698
Modified: trunk/batman-adv-kernelland/bat_debugfs.c Log: batman-adv: Ignore debugfs on kernels without debugfs support
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 a crash during the unload of the module.
Signed-off-by: Sven Eckelmann sven.eckelmann@gmx.de
Modified: trunk/batman-adv-kernelland/bat_debugfs.c =================================================================== --- trunk/batman-adv-kernelland/bat_debugfs.c 2010-06-10 07:50:32 UTC (rev 1697) +++ trunk/batman-adv-kernelland/bat_debugfs.c 2010-06-10 07:50:33 UTC (rev 1698) @@ -99,6 +99,8 @@ 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)