SWDEV-403762 - Fill pciBusId even if len <=12.

Change-Id: Iaf1b3314f4ae5597d42d54eb4c977667ecbb9cfb
This commit is contained in:
Jaydeep Patel
2023-06-02 10:46:55 +00:00
rodzic f788150132
commit 0064fac887
+2 -2
Wyświetl plik
@@ -437,7 +437,7 @@ hipError_t hipDeviceGetPCIBusId ( char* pciBusId, int len, int device ) {
}
//pciBusId should be large enough to store 13 characters including the NULL-terminator.
if (pciBusId == nullptr || len <= 12) {
if (pciBusId == nullptr) {
HIP_RETURN(hipErrorInvalidValue);
}
@@ -448,7 +448,7 @@ hipError_t hipDeviceGetPCIBusId ( char* pciBusId, int len, int device ) {
prop.pciBusID,
prop.pciDeviceID);
HIP_RETURN(hipSuccess);
HIP_RETURN(len <= 12 ? hipErrorInvalidValue : hipSuccess);
}
hipError_t hipDeviceGetSharedMemConfig ( hipSharedMemConfig * pConfig ) {