Skip to content

Commit

Permalink
Update Ds3.c
Browse files Browse the repository at this point in the history
  • Loading branch information
nefarius committed May 25, 2024
1 parent 67702e3 commit a75786b
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions sys/Ds3.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,13 @@ NTSTATUS DsUsb_Ds3RequestHostAddress(WDFDEVICE Device)
propertyData.Flags |= PLUGPLAY_PROPERTY_PERSISTENT;
propertyData.Lcid = LOCALE_NEUTRAL;

status = WdfDeviceAssignProperty(
if (!NT_SUCCESS(status = WdfDeviceAssignProperty(
Device,
&propertyData,
DEVPROP_TYPE_NTSTATUS,
sizeof(NTSTATUS),
&status
);

if (!NT_SUCCESS(status))
)))
{
TraceError(
TRACE_DS3,
Expand All @@ -134,16 +132,14 @@ NTSTATUS DsUsb_Ds3RequestHostAddress(WDFDEVICE Device)
(UINT64)(pDevCtx->HostAddress.Address[2]) << 24 |
(UINT64)(pDevCtx->HostAddress.Address[1]) << 32 |
(UINT64)(pDevCtx->HostAddress.Address[0]) << 40;

status = WdfDeviceAssignProperty(
if (!NT_SUCCESS(status = WdfDeviceAssignProperty(
Device,
&propertyData,
DEVPROP_TYPE_UINT64,
sizeof(UINT64),
&hostAddress
);

if (!NT_SUCCESS(status))
)))
{
TraceError(
TRACE_DS3,
Expand Down Expand Up @@ -462,16 +458,14 @@ NTSTATUS DsUsb_Ds3PairToNewHost(WDFDEVICE Device)

//
// Store in property
//
status = WdfDeviceAssignProperty(
//
if (!NT_SUCCESS(status = WdfDeviceAssignProperty(
Device,
&propertyData,
DEVPROP_TYPE_NTSTATUS,
sizeof(NTSTATUS),
&status
);

if (!NT_SUCCESS(status))
)))
{
TraceError(
TRACE_DS3,
Expand Down

0 comments on commit a75786b

Please sign in to comment.