diff options
author | 2023-11-28 20:49:35 +0100 | |
---|---|---|
committer | 2023-11-29 11:07:02 +0200 | |
commit | c8820c92caf0770bec976b01fa9e82bb993c5865 (patch) | |
tree | 59613e0de1692d81b74227bb32d157b4a310c4af /drivers/platform/x86/wmi.c | |
parent | platform/x86: asus-wmi: disable USB0 hub on ROG Ally before suspend (diff) | |
download | wireguard-linux-c8820c92caf0770bec976b01fa9e82bb993c5865.tar.xz wireguard-linux-c8820c92caf0770bec976b01fa9e82bb993c5865.zip |
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: c167b9c7e3d6 ("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>
Diffstat (limited to 'drivers/platform/x86/wmi.c')
0 files changed, 0 insertions, 0 deletions