Index: linux/drivers/net/wireless/zd1211rw/zd_usb.c =================================================================== --- linux.orig/drivers/net/wireless/zd1211rw/zd_usb.c 2006-12-23 12:11:21.000000000 +0100 +++ linux/drivers/net/wireless/zd1211rw/zd_usb.c 2006-12-23 12:11:51.000000000 +0100 @@ -1034,6 +1034,13 @@ goto error; } + /* If the disconnect has been caused by a removal of the + * driver module, the reset allows reloading of the driver. If the + * reset will not be executed here, the upload of the firmware in the + * probe function caused by the reloading of the driver will fail. + */ + usb_reset_device(interface_to_usbdev(intf)); + r = upload_firmware(udev, id->driver_info); if (r) { dev_err(&intf->dev, @@ -1071,7 +1078,6 @@ dev_info(&intf->dev,"%s\n", netdev->name); return 0; error: - usb_reset_device(interface_to_usbdev(intf)); zd_netdev_free(netdev); return r; } @@ -1095,13 +1101,6 @@ zd_usb_disable_rx(usb); zd_usb_disable_int(usb); - /* If the disconnect has been caused by a removal of the - * driver module, the reset allows reloading of the driver. If the - * reset will not be executed here, the upload of the firmware in the - * probe function caused by the reloading of the driver will fail. - */ - usb_reset_device(interface_to_usbdev(intf)); - zd_netdev_free(netdev); dev_dbg(&intf->dev, "disconnected\n"); }