linux-stable/drivers/platform/surface/aggregator
Francesco Dolcini c8820c92ca
platform/surface: aggregator: fix recv_buf() return value
Serdev recv_buf() callback is supposed to return the amount of bytes
consumed, therefore an int in between 0 and count.

Do not return negative number in case of issue, when
ssam_controller_receive_buf() returns ESHUTDOWN just returns 0, e.g. no
bytes consumed, this keep the exact same behavior as it was before.

This fixes a potential WARN in serdev-ttyport.c:ttyport_receive_buf().

Fixes: c167b9c7e3 ("platform/surface: Add Surface Aggregator subsystem")
Cc: stable@vger.kernel.org
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20231128194935.11350-1-francesco@dolcini.it
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
2023-11-29 11:07:02 +02:00
..
bus.c platform/surface: aggregator: Add missing fwnode_handle_put() 2023-03-22 15:23:03 +01:00
bus.h platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
controller.c platform/surface: aggregator: Allow completion work-items to be executed in parallel 2023-05-30 11:20:16 +02:00
controller.h platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
core.c platform/surface: aggregator: fix recv_buf() return value 2023-11-29 11:07:02 +02:00
Kconfig platform/surface: Disable for RISC-V 2023-06-01 08:44:57 -07:00
Makefile platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
ssh_msgb.h platform/surface: aggregator: Improve documentation and handling of message target and source IDs 2023-02-02 22:48:20 +01:00
ssh_packet_layer.c platform/surface: aggregator: Do not check for repeated unsequenced packets 2022-11-15 17:18:26 +01:00
ssh_packet_layer.h platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
ssh_parser.c platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
ssh_parser.h platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
ssh_request_layer.c platform/surface: aggregator: Improve documentation and handling of message target and source IDs 2023-02-02 22:48:20 +01:00
ssh_request_layer.h platform/surface: Update copyright year of various drivers 2022-07-02 11:23:30 +02:00
trace.h platform/surface: aggregator: Add target and source IDs to command trace events 2023-02-02 22:48:20 +01:00