sysman: fix unintialized pointer access in firmware module

Signed-off-by: T J Vivek Vilvaraj <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
T J Vivek Vilvaraj
2021-02-12 19:37:00 +00:00
committed by Compute-Runtime-Automation
parent 7d01074ee4
commit 4cf3bb6a04

View File

@@ -34,8 +34,11 @@ ze_result_t OsFirmware::getSupportedFwTypes(std::vector<std::string> &supportedF
return ZE_RESULT_SUCCESS;
}
bool LinuxFirmwareImp::isFirmwareSupported(void) {
isFWInitalized = ((ZE_RESULT_SUCCESS == pFwInterface->fwDeviceInit()) ? true : false);
return this->isFWInitalized;
if (pFwInterface != nullptr) {
isFWInitalized = ((ZE_RESULT_SUCCESS == pFwInterface->fwDeviceInit()) ? true : false);
return this->isFWInitalized;
}
return false;
}
void LinuxFirmwareImp::osGetFwProperties(zes_firmware_properties_t *pProperties) {