Skip to content
  • Alan Stern's avatar
    USB: fix interface sysfs file-creation bug · 439a903a
    Alan Stern authored
    
    
    This patch (as1005) fixes a rather subtle problem.  When
    usb_set_configuration() registers the interfaces and their files in
    sysfs, it doesn't expect those files to exist already.  But when an
    interface is registered, its driver may call usb_set_interface() and
    thereby cause the sysfs files to be created.  The result is an error
    when usb_set_configuration() goes on to create those same files again.
    
    The (not-so-great) solution is to have usb_set_configuration() remove
    any existing files before creating them.
    
    Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
    439a903a