HV: bug fix:possible access to NULL pointer

Return from the function if the NULL pointer is encountered.

Tracked-On : #1409
Signed-off-by: Manisha Chinthapally <manisha.chinthapally@intel.com>
This commit is contained in:
Manisha Chinthapally 2018-10-29 21:43:04 -07:00 committed by lijinxia
parent 9ba75c55a7
commit 8c7d471c38
1 changed files with 1 additions and 0 deletions

View File

@ -475,6 +475,7 @@ static void profiling_handle_msrops(void)
(my_msr_node->msr_op_state != (int32_t)MSR_OP_REQUESTED)) { (my_msr_node->msr_op_state != (int32_t)MSR_OP_REQUESTED)) {
dev_dbg(ACRN_DBG_PROFILING, "%s: invalid my_msr_node on cpu%d", dev_dbg(ACRN_DBG_PROFILING, "%s: invalid my_msr_node on cpu%d",
__func__, get_cpu_id()); __func__, get_cpu_id());
return;
} }
if ((my_msr_node->num_entries == 0U) || if ((my_msr_node->num_entries == 0U) ||