[PATCH] usbip: fix vhci attach sockfd sscanf format

From: Xu Rao

Date: Sun May 31 2026 - 22:11:11 EST


The vhci attach sysfs store callback parses the socket
descriptor into an int, but the sscanf() format uses %u.
Use %d so the conversion specifier matches the destination
type.

Signed-off-by: Xu Rao <raoxu@xxxxxxxxxxxxx>
---
drivers/usb/usbip/vhci_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/usbip/vhci_sysfs.c b/drivers/usb/usbip/vhci_sysfs.c
index 5bc8c47788d4..3cc4008397cb 100644
--- a/drivers/usb/usbip/vhci_sysfs.c
+++ b/drivers/usb/usbip/vhci_sysfs.c
@@ -327,7 +327,7 @@ static ssize_t attach_store(struct device *dev, struct device_attribute *attr,
* @devid: unique device identifier in a remote host
* @speed: usb device speed in a remote host
*/
- if (sscanf(buf, "%u %u %u %u", &port, &sockfd, &devid, &speed) != 4)
+ if (sscanf(buf, "%u %d %u %u", &port, &sockfd, &devid, &speed) != 4)
return -EINVAL;
pdev_nr = port_to_pdev_nr(port);
rhport = port_to_rhport(port);
--
2.50.1