Merge "video: driver: fix null pointer dereference issues"
这个提交包含在:
@@ -128,6 +128,11 @@ void msm_vidc_show_stats(void *inst)
|
||||
int x;
|
||||
struct msm_vidc_inst *i = (struct msm_vidc_inst *) inst;
|
||||
|
||||
if (!i) {
|
||||
d_vpr_e("%s: invalid params\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
for (x = 0; x < MAX_PROFILING_POINTS; x++) {
|
||||
if (i->debug.pdata[x].name[0]) {
|
||||
if (i->debug.samples) {
|
||||
|
@@ -2219,7 +2219,7 @@ static int msm_vidc_insert_sort(struct list_head *head,
|
||||
prev = node;
|
||||
}
|
||||
|
||||
if (!is_inserted)
|
||||
if (!is_inserted && prev)
|
||||
list_add(&entry->list, &prev->list);
|
||||
|
||||
return 0;
|
||||
|
@@ -1411,20 +1411,23 @@ static int handle_session_property(struct msm_vidc_inst *inst,
|
||||
}
|
||||
break;
|
||||
case HFI_PROP_QUALITY_MODE:
|
||||
if (inst->capabilities->cap[QUALITY_MODE].value != payload_ptr[0])
|
||||
if (payload_ptr &&
|
||||
inst->capabilities->cap[QUALITY_MODE].value != payload_ptr[0])
|
||||
i_vpr_e(inst,
|
||||
"%s: fw quality mode(%d) not matching the capability value(%d)\n",
|
||||
__func__, payload_ptr[0],
|
||||
inst->capabilities->cap[QUALITY_MODE].value);
|
||||
break;
|
||||
case HFI_PROP_STAGE:
|
||||
if (inst->capabilities->cap[STAGE].value != payload_ptr[0])
|
||||
if (payload_ptr &&
|
||||
inst->capabilities->cap[STAGE].value != payload_ptr[0])
|
||||
i_vpr_e(inst,
|
||||
"%s: fw stage mode(%d) not matching the capability value(%d)\n",
|
||||
__func__, payload_ptr[0], inst->capabilities->cap[STAGE].value);
|
||||
break;
|
||||
case HFI_PROP_PIPE:
|
||||
if (inst->capabilities->cap[PIPE].value != payload_ptr[0])
|
||||
if (payload_ptr &&
|
||||
inst->capabilities->cap[PIPE].value != payload_ptr[0])
|
||||
i_vpr_e(inst,
|
||||
"%s: fw pipe mode(%d) not matching the capability value(%d)\n",
|
||||
__func__, payload_ptr[0], inst->capabilities->cap[PIPE].value);
|
||||
|
在新工单中引用
屏蔽一个用户