Skip to content

Commit bbf82d5

Browse files
elizashurovYanVugenfirer
authored andcommitted
[viogpu] Fix Coverity UNUSED_VALUE issues
- Return early from `VioGpuAdapter::HWInit()` when init block fails. - Remove redundant `offset = 0` assignment in `ExecutePresentDisplayOnly()` (was overwritten immediately). Signed-off-by: Elizabeth Ashurov <eashurov@redhat.com>
1 parent 5a1023a commit bbf82d5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

viogpu/viogpudo/viogpudo.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,7 +2517,11 @@ NTSTATUS VioGpuAdapter::HWInit(PCM_RESOURCE_LIST pResList, DXGK_DISPLAY_INFORMAT
25172517
}
25182518

25192519
} while (0);
2520-
// FIXME!!! exit if the block above failed
2520+
// Exit if the block above failed
2521+
if (!NT_SUCCESS(status))
2522+
{
2523+
return status;
2524+
}
25212525

25222526
status = PsCreateSystemThread(&threadHandle,
25232527
(ACCESS_MASK)0,
@@ -2755,7 +2759,6 @@ NTSTATUS VioGpuAdapter::ExecutePresentDisplayOnly(_In_ BYTE *DstAddr,
27552759
updrect.left = 0;
27562760
updrect.bottom = pModeCur->SrcModeHeight;
27572761
updrect.right = pModeCur->SrcModeWidth;
2758-
offset = 0UL;
27592762
}
27602763
// FIXME!!! rotation
27612764
offset = (updrect.top * pModeCur->DispInfo.Pitch) +

0 commit comments

Comments
 (0)