From 0c0f859c0314be53447a5a3b771e0274d1835216 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Wed, 5 Aug 2026 09:45:46 +0200 Subject: [PATCH] Fix hang at end of camera firmware upload --- src/utils/ps4_camera_firmware.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/utils/ps4_camera_firmware.cpp b/src/utils/ps4_camera_firmware.cpp index 8f23b11f..f71539c1 100644 --- a/src/utils/ps4_camera_firmware.cpp +++ b/src/utils/ps4_camera_firmware.cpp @@ -256,7 +256,12 @@ Optional parameters: libusb_free_device_list(devs, 1); - libusb_exit(usb_context); + // We would need to properly cleanup the libusb context, but since + // the device we keep opened goes away as part of the firmware upload, + // there are cases where libusb just hangs. Since ps4_camera_firmware_main() + // is only called from the CLI, and the process exits after returning from + // here, let's skip the cleanup and let the operating system take care of it. + //libusb_exit(usb_context); return 0; }