USB: serial: mos7720: drop buffer-callback sanity checks
authorJohan Hovold <johan@kernel.org>
Wed, 19 May 2021 09:20:04 +0000 (11:20 +0200)
committerJohan Hovold <johan@kernel.org>
Fri, 21 May 2021 13:46:15 +0000 (15:46 +0200)
commit683c5cfa5d1c050c698654e9bb13b12c8e60e174
tree4548e47342a8c971ad78635eb23bf8a4a739d400
parent9a8253a7c2da1d78183029a46bf04fb7beb933eb
USB: serial: mos7720: drop buffer-callback sanity checks

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 23198fda7182 ("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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
drivers/usb/serial/mos7720.c