Explorar el Código

video-driver: Add Null Pointer check for response_workq

Add Null Pointer check for response_workq inside
cancel_response_work_sync function.

Change-Id: I574034b8937ade601cb9cda3f91c3c3bcf2c3e1e
Signed-off-by: Vedang Nagar <[email protected]>
Vedang Nagar hace 3 años
padre
commit
30cee602ed
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      driver/vidc/src/venus_hfi_response.c

+ 1 - 1
driver/vidc/src/venus_hfi_response.c

@@ -1898,7 +1898,7 @@ int cancel_response_work(struct msm_vidc_inst *inst)
 
 int cancel_response_work_sync(struct msm_vidc_inst *inst)
 {
-	if (!inst) {
+	if (!inst || !inst->response_workq) {
 		d_vpr_e("%s: Invalid arguments\n", __func__);
 		return -EINVAL;
 	}