Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit 5889b586 authored by Jerry Huang's avatar Jerry Huang Committed by Michael Bestas
Browse files

video: driver: Return proper error code

Return correct error code when session
is not supported since remaining memory
is not sufficient to proceed current session

Bug: 273301608
Test: CtsMediaMiscTestCases:android.media.misc.cts.ResourceManagerTest#testAVCVideoCodecReclaimHighResolution
Change-Id: Ib989b7ad41606303f2ff3359768105b10cf9393d
parent 29ea278c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -3547,7 +3547,7 @@ static int msm_vidc_load_resources(int flipped_state,
			"H/W is overloaded. needed: %d max: %d\n",
			video_load, max_video_load);
		msm_vidc_print_running_insts(inst->core);
		return -EBUSY;
		return -ENOMEM;
	}

	if (video_load + image_load > max_video_load + max_image_load) {
@@ -3555,7 +3555,7 @@ static int msm_vidc_load_resources(int flipped_state,
			"H/W is overloaded. needed: [video + image][%d + %d], max: [video + image][%d + %d]\n",
			video_load, image_load, max_video_load, max_image_load);
		msm_vidc_print_running_insts(inst->core);
		return -EBUSY;
		return -ENOMEM;
	}

	hdev = core->device;