Remove unnecessary assignment when USB devices unchanged

Addresses PR #718 review comment - no need to assign config.UsbDevices
when we've already verified the devices are equal.
This commit is contained in:
Alex P 2025-11-18 02:11:29 +02:00
parent 2e84354d78
commit a1a2b9d1c0
1 changed files with 0 additions and 1 deletions

View File

@ -966,7 +966,6 @@ func rpcSetUsbDevices(usbDevices usbgadget.Devices) error {
// Skip reconfiguration if devices haven't changed to avoid HID disruption
if currentDevices.Equals(usbDevices) {
logger.Debug().Msg("USB devices unchanged, skipping gadget reconfiguration")
config.UsbDevices = &usbDevices
return nil
}