diff options
author | Li Xiaowei <xiaowei.a.li@intel.com> | 2014-01-09 13:33:44 +0800 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2014-02-27 10:30:26 +0800 |
commit | eb27b94384e4f5777ef06b0855ecae69155c3175 (patch) | |
tree | fbeac71194614025fdf0e7f16fcb5716b34d9b2b | |
parent | 994dd815289fc0b9378078ce2cce19a53250e481 (diff) | |
download | libva-intel-driver-eb27b94384e4f5777ef06b0855ecae69155c3175.tar.gz libva-intel-driver-eb27b94384e4f5777ef06b0855ecae69155c3175.tar.bz2 libva-intel-driver-eb27b94384e4f5777ef06b0855ecae69155c3175.zip |
VPP: Correct return value of vpp gpe functions
Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
-rw-r--r-- | src/gen75_vpp_gpe.c | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/gen75_vpp_gpe.c b/src/gen75_vpp_gpe.c index 08de61b..ac09100 100644 --- a/src/gen75_vpp_gpe.c +++ b/src/gen75_vpp_gpe.c @@ -359,12 +359,19 @@ gen75_gpe_process(VADriverContextP ctx, VAStatus va_status = VA_STATUS_SUCCESS; va_status = gen75_gpe_process_init(ctx, vpp_gpe_ctx); - va_status |=gen75_gpe_process_prepare(ctx, vpp_gpe_ctx); - va_status |=gen75_gpe_process_run(ctx, vpp_gpe_ctx); - - return va_status; -} + if (va_status != VA_STATUS_SUCCESS) + return va_status; + va_status = gen75_gpe_process_prepare(ctx, vpp_gpe_ctx); + if (va_status != VA_STATUS_SUCCESS) + return va_status; + + va_status = gen75_gpe_process_run(ctx, vpp_gpe_ctx); + if (va_status != VA_STATUS_SUCCESS) + return va_status; + + return VA_STATUS_SUCCESS; +} static VAStatus gen8_gpe_process_surfaces_setup(VADriverContextP ctx, @@ -596,10 +603,18 @@ gen8_gpe_process(VADriverContextP ctx, VAStatus va_status = VA_STATUS_SUCCESS; va_status = gen8_gpe_process_init(ctx, vpp_gpe_ctx); - va_status |=gen8_gpe_process_prepare(ctx, vpp_gpe_ctx); - va_status |=gen8_gpe_process_run(ctx, vpp_gpe_ctx); + if (va_status != VA_STATUS_SUCCESS) + return va_status; - return va_status; + va_status = gen8_gpe_process_prepare(ctx, vpp_gpe_ctx); + if (va_status != VA_STATUS_SUCCESS) + return va_status; + + va_status = gen8_gpe_process_run(ctx, vpp_gpe_ctx); + if (va_status != VA_STATUS_SUCCESS) + return va_status; + + return VA_STATUS_SUCCESS; } static VAStatus |