Am Sonntag, 24. Juni 2012, 11:34:19 schrieb Bjørn Mork: > Oliver Neukum <oliver@xxxxxxxxxx> writes: > > 1. We mirror the minidrivers closely, which reduces errors > > 2. unbind() is called with the data anyway and after disconnect() > > the intfdata is not valid anyway, because the interface may have been > > reprobed. > > Sorry, I did not understand what you meant we should do here. The extra > usb_set_intfdata(, NULL) in usbnet_disconnect() won't make any > difference for that piece of code, will it? The point is that if it may be set to NULL, we always want it to be set to NULL, so we catch bugs. > And the USB core ensures that intfdata is set to NULL before any > reprobing, so that will never be a problem. That's the reason why it > seems redundant setting it in usbnet_disconnect(). The point is that if there is a problem because intfdata is set to NULL, there is very likely a problem in form of a race condition, if intfdata were not set to NULL in usbnet's disconnect handler. Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html