Files
Johan Hovold 2ba11e4309 serdev: fix receive_buf return value when no callback
[ Upstream commit fd00cf81a9 ]

The receive_buf callback is supposed to return the number of bytes
processed and should specifically not return a negative errno.

Due to missing sanity checks in the serdev tty-port controller, a driver
not providing a receive_buf callback could cause the flush_to_ldisc()
worker to spin in a tight loop when the tty buffer pointers are
incremented with -EINVAL (-22).

The missing sanity checks have now been added to the tty-port
controller, but let's fix up the serdev-controller helper as well.

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-02-25 11:07:53 +01:00
..
2017-12-29 17:53:47 +01:00
2017-12-25 14:26:33 +01:00
2018-02-22 15:42:23 +01:00
2018-01-17 09:45:27 +01:00
2018-02-22 15:42:23 +01:00
2018-02-22 15:42:23 +01:00
2017-09-08 18:26:46 -07:00
2018-02-22 15:42:24 +01:00
2018-02-22 15:42:23 +01:00
2018-02-22 15:42:23 +01:00
2017-09-25 08:56:05 -06:00
2017-12-20 10:10:18 +01:00
2018-02-22 15:42:23 +01:00
2018-02-22 15:42:23 +01:00