Clean up code for nullptr device check during cmdlist create

Signed-off-by: Vinod Tipparaju <vinod.tipparaju@intel.com>
This commit is contained in:
Vinod Tipparaju
2020-11-11 01:08:54 +05:30
committed by Compute-Runtime-Automation
parent 905d59d7e3
commit 240563099c
5 changed files with 2 additions and 17 deletions

View File

@ -40,8 +40,6 @@ struct EncodeStateBaseAddress;
inline ze_result_t parseErrorCode(NEO::ErrorCode returnValue) {
switch (returnValue) {
case NEO::ErrorCode::INVALID_DEVICE:
return ZE_RESULT_ERROR_INVALID_NULL_HANDLE;
case NEO::ErrorCode::OUT_OF_DEVICE_MEMORY:
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
default:

View File

@ -36,9 +36,7 @@ ze_result_t CommandQueueImp::initialize(bool copyOnly, bool isInternal) {
NEO::GraphicsAllocation *bufferAllocation = buffers.getCurrentBufferAllocation();
commandStream = new NEO::LinearStream(bufferAllocation->getUnderlyingBuffer(),
defaultQueueCmdBufferSize);
if (!commandStream) {
return ZE_RESULT_ERROR_OUT_OF_DEVICE_MEMORY;
}
UNRECOVERABLE_IF(commandStream == nullptr);
commandStream->replaceGraphicsAllocation(bufferAllocation);
isCopyOnlyCommandQueue = copyOnly;
}