*/
static int parse_resource_data(struct pass *pass, int id, json_object *obj)
{
- struct pass_resource_config_data *config_data
- = &(pass->res[id].config_data);
+ struct pass_resource_config_data *config_data;
char device_type[BUFF_MAX] = {};
int ret = 0;
if(!pass || id < 0 || !obj)
return -EINVAL;
+ config_data = &(pass->res[id].config_data);
+
/* Get property values */
struct config_property resource_properties[] = {
{ "device_type", DATA_TYPE_STRING, true, (void *)device_type },