• Johan Hovold's avatar
    USB: serial: mos7720: drop buffer-callback sanity checks · 683c5cfa
    Johan Hovold authored
    The driver write_room and chars_in_buffer callbacks used to incorrectly
    return a negative errno in case they were ever called with a NULL port
    driver-data pointer. The return value was later changed to zero by
    commit 23198fda ("tty: fix chars_in_buffers") but the bogus sanity
    checks were left in place as were the outdated function-header comments.
    
    The port driver data isn't cleared until after the port has been
    deregistered and all open ttys have been hung up so drop the unnecessary
    sanity checks and the outdated comments.
    Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
    683c5cfa
mos7720.c 47.6 KB