USB: serial: io_edgeport: drop buffer-callback sanity checks
authorJohan Hovold <johan@kernel.org>
Wed, 19 May 2021 09:20:03 +0000 (11:20 +0200)
committerJohan Hovold <johan@kernel.org>
Fri, 21 May 2021 13:46:08 +0000 (15:46 +0200)
commit9a8253a7c2da1d78183029a46bf04fb7beb933eb
tree69f2213a1eb1261928da31ae004336a5a14bfcc5
parentdcbc0ae4f8fcdd4c873e7a9bac49ab84b0453813
USB: serial: io_edgeport: 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 called while or after the port
had been closed. The return value was later changed to zero by commit
d76f2f4462bb ("io_edgeport: Fix various bogus returns to the tty
layer") but the bogus sanity checks were left in place as were the
outdated function-header comments.

These callbacks will never be called for an uninitialised port 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/io_edgeport.c