diff --git a/dlls/win32u/sysparams.c b/dlls/win32u/sysparams.c index 5fec4ade0f8..dd494188121 100644 --- a/dlls/win32u/sysparams.c +++ b/dlls/win32u/sysparams.c @@ -702,7 +702,6 @@ static void cleanup_devices(void) hkey = reg_open_key( enum_key, pciW, sizeof(pciW) ); -restart: while (!NtEnumerateKey( hkey, i++, KeyNodeInformation, key, sizeof(buffer), &size )) { unsigned int j = 0; @@ -735,7 +734,7 @@ restart: NtClose( device_key ); if (!present && reg_delete_tree( subkey, bufferW, lstrlenW( bufferW ) * sizeof(WCHAR) )) - goto restart; + j = 0; } NtClose( subkey );