From 29ea278cb82c5eaba4e3525bd9fefceda9e7322f Mon Sep 17 00:00:00 2001 From: Jerry Huang Date: Thu, 6 Apr 2023 19:50:01 +0800 Subject: [PATCH] video: driver: Return proper error code Return correct error code when session is not supported when max mbpf limit is reached. Bug: 273301608 Test: CtsMediaMiscTestCases android.media.misc.cts.ResourceManagerTest#testReclaimResourceMixVsNonsecureHighResolution Change-Id: I50739758df36d534970101977a1f64a465ba3e77 --- techpack/video/msm/vidc/msm_vidc_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/techpack/video/msm/vidc/msm_vidc_common.c b/techpack/video/msm/vidc/msm_vidc_common.c index 4a9b9a14dcda..3e968fc92def 100644 --- a/techpack/video/msm/vidc/msm_vidc_common.c +++ b/techpack/video/msm/vidc/msm_vidc_common.c @@ -5818,7 +5818,7 @@ static int msm_vidc_check_mbpf_supported(struct msm_vidc_inst *inst) if (mbpf > core->resources.max_mbpf) { msm_vidc_print_running_insts(inst->core); - return -EBUSY; + return -ENOMEM; } return 0;