From a1a2b9d1c0ea64329b4b3a51e22d2945561cd9c5 Mon Sep 17 00:00:00 2001 From: Alex P Date: Tue, 18 Nov 2025 02:11:29 +0200 Subject: [PATCH] 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. --- jsonrpc.go | 1 - 1 file changed, 1 deletion(-) diff --git a/jsonrpc.go b/jsonrpc.go index 3f32e839..69235805 100644 --- a/jsonrpc.go +++ b/jsonrpc.go @@ -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 }