Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usbip: usbip_host: cleanup do_rebind() return path

Cleanup do_rebind() return path and use common return path.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Shuah Khan and committed by
Greg Kroah-Hartman
3a38e874 a188339c

+3 -5
+3 -5
drivers/usb/usbip/stub_main.c
··· 201 201 202 202 static int do_rebind(char *busid, struct bus_id_priv *busid_priv) 203 203 { 204 - int ret; 204 + int ret = 0; 205 205 206 206 /* device_attach() callers should hold parent lock for USB */ 207 207 if (busid_priv->udev->dev.parent) ··· 209 209 ret = device_attach(&busid_priv->udev->dev); 210 210 if (busid_priv->udev->dev.parent) 211 211 device_unlock(busid_priv->udev->dev.parent); 212 - if (ret < 0) { 212 + if (ret < 0) 213 213 dev_err(&busid_priv->udev->dev, "rebind failed\n"); 214 - return ret; 215 - } 216 - return 0; 214 + return ret; 217 215 } 218 216 219 217 static void stub_device_rebind(void)