Consider full request if conf is set to full request but the actual required value... 62/232962/9
authorYoungHun Kim <yh8004.kim@samsung.com>
Mon, 11 May 2020 02:56:30 +0000 (11:56 +0900)
committerYoungHun Kim <yh8004.kim@samsung.com>
Thu, 21 May 2020 07:55:20 +0000 (07:55 +0000)
Change-Id: I297680a755794f74a81a5b9338d2a3f1a4113ce5

src/lib/mm_resource_manager_priv.c

index 8b16e01..7ced687 100644 (file)
@@ -616,7 +616,11 @@ static int __create_resource(mm_resource_manager_s *rm,
 
        *res = g_new0(mm_resource_manager_res_s, 1);
        (*res)->type = type;
-       (*res)->volume = volume;
+       if (handle->__max_resource_volumes[type] == MM_RESOURCE_MANAGER_RES_VOLUME_FULL &&
+               volume != MM_RESOURCE_MANAGER_RES_VOLUME_FULL)
+               (*res)->volume = MM_RESOURCE_MANAGER_RES_VOLUME_FULL;
+       else
+               (*res)->volume = volume;
 
        return MM_RESOURCE_MANAGER_ERROR_NONE;
 }