summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhan Trinh Ha <[email protected]>2022-09-21 09:48:21 -0700
committerGitHub <[email protected]>2022-09-21 09:48:21 -0700
commit239361d9ab5c4b2098896f7a29451b99b71d9063 (patch)
treef737d7635fdb1204c9e712ec48a71e9c102f07ed
parent110e8c201d5a929fc01e333ceac0dc71b0267237 (diff)
[general/toaster] Handle non successful return value of WdfIoTargetStart in toastmon.c (#785)
Handle non-successful return value of WdfIoTargetStart in toastmon.c
-rw-r--r--general/toaster/toastDrv/kmdf/toastmon/toastmon.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/general/toaster/toastDrv/kmdf/toastmon/toastmon.c b/general/toaster/toastDrv/kmdf/toastmon/toastmon.c
index 5967d019..3e1a8caf 100644
--- a/general/toaster/toastDrv/kmdf/toastmon/toastmon.c
+++ b/general/toaster/toastDrv/kmdf/toastmon/toastmon.c
@@ -334,7 +334,11 @@ Routine Description:
for (i = 0; i < count; i ++) {
ioTarget = WdfCollectionGetItem(deviceExtension->TargetDeviceCollection, i);
- WdfIoTargetStart(ioTarget);
+ NTSTATUS status = WdfIoTargetStart(ioTarget);
+ if (!NT_SUCCESS(status)) {
+ KdPrint(("WdfIoTargetStart failed: 0x%x\n", status));
+ continue;
+ }
targetDeviceInfo = GetTargetDeviceInfo(ioTarget);
WdfTimerStart(targetDeviceInfo->TimerForPostingRequests,