Skip to content

Commit 43394d0

Browse files
fixed nullnumDevices condition
Signed-off-by: Zhang, Winston <[email protected]>
1 parent 3128d8b commit 43394d0

File tree

1 file changed

+1
-4
lines changed
  • unified-runtime/source/adapters/level_zero

1 file changed

+1
-4
lines changed

unified-runtime/source/adapters/level_zero/device.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,8 @@ ur_result_t urDeviceGet(
166166
if (Devices)
167167
std::copy_n(MatchedDevices.begin(), N, Devices);
168168

169-
if (NumDevices) {
169+
if (NumDevices)
170170
*NumDevices = ZeDeviceCount;
171-
} else {
172-
*NumDevices = N;
173-
}
174171

175172
return UR_RESULT_SUCCESS;
176173
}

0 commit comments

Comments
 (0)