SWDEV-311856 - check if the function pointer is valid

Change-Id: Iaa5bd7f8321434ce63d0bcf2791d3c65577b453d
这个提交包含在:
haoyuan2 编写, Anusha Godavarthy Surya 于 2021-12-04 04:40:09 -05:00 提交
1 父节点 bf28ecb048
当前提交 1101cfedf5
1 个文件已更改
+2 -1
+2 -1
查看文件
@@ -1055,7 +1055,8 @@ hipError_t hipGraphAddDependencies(hipGraph_t graph, const hipGraphNode_t* from,
hipError_t hipGraphExecKernelNodeSetParams(hipGraphExec_t hGraphExec, hipGraphNode_t node,
const hipKernelNodeParams* pNodeParams) {
HIP_INIT_API(hipGraphExecKernelNodeSetParams, hGraphExec, node, pNodeParams);
if (hGraphExec == nullptr || node == nullptr || pNodeParams == nullptr) {
if (hGraphExec == nullptr || node == nullptr || pNodeParams == nullptr ||
pNodeParams->func == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
hipGraphNode_t clonedNode = hGraphExec->GetClonedNode(node);