hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/drivers/usb/usbip/stub_main.c
....@@ -202,7 +202,7 @@
202202
203203 static int do_rebind(char *busid, struct bus_id_priv *busid_priv)
204204 {
205
- int ret;
205
+ int ret = 0;
206206
207207 /* device_attach() callers should hold parent lock for USB */
208208 if (busid_priv->udev->dev.parent)
....@@ -210,11 +210,9 @@
210210 ret = device_attach(&busid_priv->udev->dev);
211211 if (busid_priv->udev->dev.parent)
212212 device_unlock(busid_priv->udev->dev.parent);
213
- if (ret < 0) {
213
+ if (ret < 0)
214214 dev_err(&busid_priv->udev->dev, "rebind failed\n");
215
- return ret;
216
- }
217
- return 0;
215
+ return ret;
218216 }
219217
220218 static void stub_device_rebind(void)