Skip to content

Commit 14bcbcc

Browse files
committed
SWDEV-450204 - hipGetProcAddress check for null corrected
Change-Id: Ic34b0d561d3d70f3411a60924a64c3b89954394f
1 parent c13864a commit 14bcbcc

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

hipamd/src/hip_api_trace.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ hipError_t hipExtGetLastError();
762762
hipError_t hipTexRefGetBorderColor(float* pBorderColor, const textureReference* texRef);
763763
hipError_t hipTexRefGetArray(hipArray_t* pArray, const textureReference* texRef);
764764
hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion, uint64_t flags,
765-
hipDriverProcAddressQueryResult* symbolStatus = NULL);
765+
hipDriverProcAddressQueryResult* symbolStatus);
766766
hipError_t hipStreamBeginCaptureToGraph(hipStream_t stream, hipGraph_t graph,
767767
const hipGraphNode_t* dependencies,
768768
const hipGraphEdgeData* dependencyData,

hipamd/src/hip_device.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,11 +602,11 @@ hipError_t hipGetDevicePropertiesR0000(hipDeviceProp_tR0000* prop, int device) {
602602
}
603603

604604
hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion, uint64_t flags,
605-
hipDriverProcAddressQueryResult* symbolStatus = nullptr) {
605+
hipDriverProcAddressQueryResult* symbolStatus) {
606606
HIP_INIT_API(hipGetProcAddress, symbol, pfn, hipVersion, flags, symbolStatus);
607607

608608
std::string symbolString = symbol;
609-
if(symbol == nullptr || symbolString == "" || *pfn == nullptr){
609+
if(symbol == nullptr || symbolString == "" || pfn == nullptr){
610610
HIP_RETURN(hipErrorInvalidValue);
611611
}
612612

hipamd/src/hip_table_interface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1729,7 +1729,7 @@ hipError_t hipTexRefGetArray(hipArray_t* pArray, const textureReference* texRef)
17291729
}
17301730
extern "C" hipError_t hipGetProcAddress(const char* symbol, void** pfn, int hipVersion,
17311731
uint64_t flags,
1732-
hipDriverProcAddressQueryResult* symbolStatus = nullptr) {
1732+
hipDriverProcAddressQueryResult* symbolStatus) {
17331733
return hip::GetHipDispatchTable()->hipGetProcAddress_fn(symbol, pfn, hipVersion, flags,
17341734
symbolStatus);
17351735
}

0 commit comments

Comments
 (0)