Piotr Caban : hid: Fix error handling in HidP_SetUsages.

Alexandre Julliard julliard at winehq.org
Tue May 14 15:43:03 CDT 2019


Module: wine
Branch: master
Commit: 2b5efe1b1ce9def223cdc6abad4618b1e1dfbfdf
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=2b5efe1b1ce9def223cdc6abad4618b1e1dfbfdf

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Tue May 14 12:43:45 2019 +0200

hid: Fix error handling in HidP_SetUsages.

Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hid/hidp.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dlls/hid/hidp.c b/dlls/hid/hidp.c
index 0416426..8c04670 100644
--- a/dlls/hid/hidp.c
+++ b/dlls/hid/hidp.c
@@ -599,12 +599,12 @@ NTSTATUS WINAPI HidP_SetUsages(HIDP_REPORT_TYPE ReportType, USAGE UsagePage, USH
         {
             rc = set_report_data((BYTE*)Report, ReportLength,
                     element.valueStartBit, element.bitCount, -1);
+        }
 
-            if (rc != HIDP_STATUS_SUCCESS)
-            {
-                *UsageLength = i;
-                return rc;
-            }
+        if (rc != HIDP_STATUS_SUCCESS)
+        {
+            *UsageLength = i;
+            return rc;
         }
     }
 




More information about the wine-cvs mailing list