linux-stable/drivers/platform/surface
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
..
aggregator platform/surface: aggregator: fix recv_buf() return value 2023-11-29 11:07:02 +02:00
Kconfig platform/surface: aggregator: Move subsystem hub drivers to their own module 2022-07-02 11:23:25 +02:00
Makefile platform/surface: aggregator: Move subsystem hub drivers to their own module 2022-07-02 11:23:25 +02:00
surface3-wmi.c platform/surface: surface3-wmi: Convert to platform remove callback returning void 2023-09-21 18:31:18 +02:00
surface3_power.c platform/surface: surface3_power: Switch back to use struct i2c_driver's .probe() 2023-06-13 12:32:16 +02:00
surface_acpi_notify.c platform-drivers-x86 for v6.7-1 2023-10-31 17:53:00 -10:00
surface_aggregator_cdev.c platform/surface: aggregator-cdev: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_aggregator_hub.c platform/surface: aggregator_registry: Fix target-ID of base-hub 2023-02-02 22:48:20 +01:00
surface_aggregator_registry.c platform/surface: aggregator-registry: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_aggregator_tabletsw.c platform/surface: aggregator_tabletsw: Add support for book mode in POS subsystem 2023-05-30 11:20:30 +02:00
surface_dtx.c platform/surface: dtx: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_gpe.c platform/surface: gpe: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_hotplug.c platform/surface: hotplug: Convert to platform remove callback returning void 2023-09-21 18:31:19 +02:00
surface_platform_profile.c platform/surface: platform_profile: Propagate error if profile registration fails 2023-10-18 15:30:54 +02:00
surfacepro3_button.c ACPI: make remove callback of ACPI driver void 2022-11-23 19:11:22 +01:00