Skip to content

Commit 9a6b91d

Browse files
committed
restructure
Signed-off-by: Byoungro So <[email protected]>
1 parent e04b730 commit 9a6b91d

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4305,15 +4305,12 @@ pi_result piProgramBuild(pi_program Program, pi_uint32 NumDevices,
43054305
// are supposed to be fully linked and ready to use. Therefore, do an extra
43064306
// check now for unresolved symbols.
43074307
ze_result_t ZeResult = checkUnresolvedSymbols(ZeModule, &Program->ZeBuildLog);
4308-
if (ZeResult == ZE_RESULT_ERROR_MODULE_LINK_FAILURE) {
4309-
// remove ZeModule that is associated with the failed program
4310-
ZE_CALL_NOCHECK(zeModuleDestroy, (ZeModule));
4311-
ZeModule = nullptr;
4312-
return PI_BUILD_PROGRAM_FAILURE;
4313-
} else if (ZeResult != ZE_RESULT_SUCCESS) {
4308+
if (ZeResult != ZE_RESULT_SUCCESS) {
43144309
// remove ZeModule that is associated with the failed program
43154310
ZE_CALL_NOCHECK(zeModuleDestroy, (ZeModule));
4316-
ZeModule = nullptr;
4311+
4312+
if (ZeResult == ZE_RESULT_ERROR_MODULE_LINK_FAILURE)
4313+
return PI_BUILD_PROGRAM_FAILURE;
43174314
return mapError(ZeResult);
43184315
}
43194316

0 commit comments

Comments
 (0)