We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6ac33dd commit 9d48c55Copy full SHA for 9d48c55
FrameworkSensors/EcCommunication.cpp
@@ -21,12 +21,15 @@
21
NTSTATUS ConnectToEc(
22
_Inout_ HANDLE* Handle
23
) {
24
- NTSTATUS Status = STATUS_SUCCESS;
+ if (Handle == NULL) {
25
+ TraceError("%!FUNC! Handle pointer is NULL");
26
+ return STATUS_INVALID_PARAMETER;
27
+ }
28
29
if (*Handle != INVALID_HANDLE_VALUE) {
30
// Already connected
31
TraceError("%!FUNC! Already connected");
- return Status;
32
+ return STATUS_SUCCESS;
33
}
34
35
*Handle = CreateFileW(
@@ -44,7 +47,7 @@ NTSTATUS ConnectToEc(
44
47
45
48
46
49
TraceInformation("%!FUNC! Got Handle");
50
51
52
53
int CrosEcSendCommand(
0 commit comments