px4io: Check for bad param value

This commit is contained in:
Lorenz Meier 2014-05-23 19:45:29 +02:00
parent b30e872453
commit 69421be983
1 changed files with 4 additions and 2 deletions

View File

@ -581,8 +581,10 @@ PX4IO::init()
ASSERT(_task == -1); ASSERT(_task == -1);
sys_restart_param = param_find("SYS_RESTART_TYPE"); sys_restart_param = param_find("SYS_RESTART_TYPE");
if (sys_restart_param != PARAM_INVALID) {
/* Indicate restart type is unknown */ /* Indicate restart type is unknown */
param_set(sys_restart_param, &sys_restart_val); param_set(sys_restart_param, &sys_restart_val);
}
/* do regular cdev init */ /* do regular cdev init */
ret = CDev::init(); ret = CDev::init();