char buf[BUFF_MAX];
int len, ret;
+ if (!compatible || !path_compatible)
+ return 0;
+
ret = sys_get_str(path_compatible, buf);
if (ret < 0) {
_E("cannot read compatible path: %s\n",
if (json_object_object_get_ex(obj, "device_list", &device_list))
num_resources = json_object_array_length(device_list);
+ /* Check the optional property values are valid or not */
+ if (!board_name || !board_name_path)
+ _E("Failed to get 'board_name' or 'board_name_path' property\n");
+
/* Check the mandatory property values are valid or not */
- if (!board_name || !board_name_path) {
- _E("Failed to get 'board_name' property\n");
- return -EINVAL;
- } else if (!device_list) {
+ if (!device_list) {
_E("Failed to get 'device_list' property\n");
return -EINVAL;
} else if (num_resources <= 0) {