• Johan Hovold's avatar
    USB: serial: mos7840: fix probe error handling · 960fbd1c
    Johan Hovold authored
    The driver would return success and leave the port structures
    half-initialised if any of the register accesses during probe fails.
    
    This would specifically leave the port control urb unallocated,
    something which could trigger a NULL pointer dereference on interrupt
    events.
    
    Fortunately the interrupt implementation is completely broken and has
    never even been enabled...
    
    Note that the zero-length-enable register write used to set the zle-flag
    for all ports is moved to attach.
    Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    960fbd1c
mos7840.c 66.8 KB